Skip to content

Commit

Permalink
feat(home-manager): init k9s module (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjw-s authored Apr 14, 2024
1 parent 850c26a commit ef464d6
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 1 deletion.
22 changes: 21 additions & 1 deletion _sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,26 @@
},
"version": "0317a097b6ec8122b1da6d02f61d0c5158019f6e"
},
"k9s": {
"cargoLocks": null,
"date": "2024-03-22",
"extract": null,
"name": "k9s",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "catppuccin",
"repo": "k9s",
"rev": "82eba6feb442932e28facedfb18dfbe79234f180",
"sha256": "sha256-VLi7G6Rjmbr6feSOg8aLYJmOb+GyJUKi3k9qod6ut9k=",
"type": "github"
},
"version": "82eba6feb442932e28facedfb18dfbe79234f180"
},
"kitty": {
"cargoLocks": null,
"date": "2024-01-10",
Expand Down Expand Up @@ -559,4 +579,4 @@
},
"version": "0adc53028d81bf047461bc61c43a484d11b15220"
}
}
}
12 changes: 12 additions & 0 deletions _sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@
};
date = "2024-01-17";
};
k9s = {
pname = "k9s";
version = "82eba6feb442932e28facedfb18dfbe79234f180";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "k9s";
rev = "82eba6feb442932e28facedfb18dfbe79234f180";
fetchSubmodules = false;
sha256 = "sha256-VLi7G6Rjmbr6feSOg8aLYJmOb+GyJUKi3k9qod6ut9k=";
};
date = "2024-03-22";
};
kitty = {
pname = "kitty";
version = "d7d61716a83cd135344cbb353af9d197c5d7cec1";
Expand Down
28 changes: 28 additions & 0 deletions modules/home-manager/k9s.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ config
, lib
, sources
, ...
}:
let
cfg = config.programs.k9s.catppuccin;
enable = cfg.enable && config.programs.k9s.enable;

themeFile = "catppuccin-${cfg.flavour}.yaml";
themePath = "/skins/${themeFile}";
theme = sources.k9s + "/dist/${themeFile}";
in
{
options.programs.k9s.catppuccin =
lib.ctp.mkCatppuccinOpt "k9s";

config = lib.mkIf enable
{
assertions = [
(lib.ctp.assertXdgEnabled "k9s")
];

xdg.configFile."k9s${themePath}".source = theme;

programs.k9s.settings.k9s.ui.skin = "catppuccin-${cfg.flavour}";
};
}
4 changes: 4 additions & 0 deletions nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ fetch.github = "catppuccin/hyprland"
src.git = "https://github.com/catppuccin/imv.git"
fetch.github = "catppuccin/imv"

[k9s]
src.git = "https://github.com/catppuccin/k9s.git"
fetch.github = "catppuccin/k9s"

[kitty]
src.git = "https://github.com/catppuccin/kitty.git"
fetch.github = "catppuccin/kitty"
Expand Down
1 change: 1 addition & 0 deletions test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ in
helix = ctpEnable;
home-manager.enable = false;
imv = ctpEnable;
k9s = ctpEnable;
kitty = ctpEnable;
lazygit = ctpEnable;
micro = ctpEnable;
Expand Down

0 comments on commit ef464d6

Please sign in to comment.