rose-pine-nix/modules/home-manager/fish.nix
punkfairie 14b2e2c3f3
Some checks failed
Release / Make release (push) Has been cancelled
CI / Test Modules (push) Has been cancelled
CI / Format Nix files (push) Has been cancelled
CI / Validate sources (push) Has been cancelled
Build & deploy website / Build site (push) Has been cancelled
Release / Publish to Flake registries (push) Has been cancelled
Build & deploy website / Deploy website (push) Has been cancelled
fix(fish): Remove trailing whitespace in themeName
2024-11-05 18:47:13 -08:00

25 lines
588 B
Nix

{
config,
lib,
...
}:
let
inherit (config.rose-pine) sources;
cfg = config.programs.fish.rose-pine;
enable = cfg.enable && config.programs.fish.enable;
themeName = lib.strings.trim "Rosé Pine ${lib.rp.mkUpper (lib.rp.getFlavor 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}"
'';
};
}