diff --git a/.sources/sources.json b/.sources/sources.json index b430241..94b51a8 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -156,6 +156,18 @@ "url": "https://github.com/catppuccin/k9s/archive/fdbec82284744a1fc2eb3e2d24cb92ef87ffb8b4.tar.gz", "hash": "0cs7j1z0xq66w0700qcrc6ynzmw3bdr422p1rnkl7hxq8g4a67zn" }, + "k9s-theme": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "sasoria", + "repo": "k9s-theme" + }, + "branch": "main", + "revision": "4ed8c473f16642b894bb501f1cd979fb670cce2d", + "url": "https://github.com/sasoria/k9s-theme/archive/4ed8c473f16642b894bb501f1cd979fb670cce2d.tar.gz", + "hash": "17lrv30wiql6i0ll33wng9ziizlzg9kx0wa960i900crfcq94168" + }, "lazygit": { "type": "Git", "repository": { @@ -446,4 +458,4 @@ } }, "version": 3 -} +} \ No newline at end of file diff --git a/modules/home-manager/k9s.nix b/modules/home-manager/k9s.nix index c833ad9..06240e7 100644 --- a/modules/home-manager/k9s.nix +++ b/modules/home-manager/k9s.nix @@ -3,34 +3,34 @@ lib, pkgs, ... -}: -let - inherit (config.catppuccin) sources; +}: let + inherit (config.rose-pine) sources; - cfg = config.programs.k9s.catppuccin; + cfg = config.programs.k9s.rose-pine; enable = cfg.enable && config.programs.k9s.enable; # NOTE: On MacOS specifically, k9s expects its configuration to be in - # `~/Library/Application Support` when not using XDG + # `~/Library/Application Support` when not using XDG. enableXdgConfig = !pkgs.stdenv.hostPlatform.isDarwin || config.xdg.enable; - themeName = "catppuccin-${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent"; - themeFile = "${themeName}.yaml"; + themeFile = "rose-pine.yaml"; themePath = "k9s/skins/${themeFile}"; - theme = sources.k9s + "/dist/${themeFile}"; -in -{ - options.programs.k9s.catppuccin = lib.ctp.mkCatppuccinOpt { name = "k9s"; } // { - transparent = lib.mkEnableOption "transparent version of flavor"; - }; + theme = sources.k9s + "/skin.yml"; +in { + options.programs.k9s.rose-pine = lib.rp.mkRosePineOpt {name = "k9s";}; config = lib.mkIf enable ( lib.mkMerge [ (lib.mkIf (!enableXdgConfig) { home.file."Library/Application Support/${themePath}".source = theme; }) - (lib.mkIf enableXdgConfig { xdg.configFile.${themePath}.source = theme; }) - { programs.k9s.settings.k9s.ui.skin = themeName; } + (lib.mkIf enableXdgConfig { + xdg.configFile.${themePath}.source = theme; + }) + + { + programs.k9s.settings.k9s.ui.skin = "rose-pine"; + } ] ); }