rose-pine-nix/modules/home-manager/fish.nix
punkfairie ac3a0ba204
Some checks are pending
CI / Format Nix files (push) Waiting to run
CI / Test Modules (push) Waiting to run
CI / Validate sources (push) Waiting to run
Release / Make release (push) Waiting to run
Release / Publish to Flake registries (push) Blocked by required conditions
Build & deploy website / Deploy website (push) Blocked by required conditions
Build & deploy website / Build site (push) Waiting to run
feat(fish): Catppuccin -> Rose Pine
2024-10-19 20:33:32 -07:00

25 lines
610 B
Nix

{
config,
lib,
...
}: let
inherit (config.rose-pine) sources;
cfg = config.programs.fish.rose-pine;
enable = cfg.enable && config.programs.fish.enable;
themeName =
if (cfg.flavor == "main")
then "Rosé Pine"
else "Rosé Pine ${lib.rp.mkUpper cfg.flavor}";
themePath = "/themes/${themeName}.theme";
in {
options.programs.fish.rose-pine = lib.rp.mkRosePineOpt {name = "fish";};
config = lib.mkIf enable {
xdg.configFile."fish${themePath}".source = "${sources.fish}${themePath}";
programs.fish.shellInit = ''
fish_config theme choose "${themeName}"
'';
};
}