punkfairie
df477c3850
Some checks failed
CI / Format Nix files (push) Has been cancelled
CI / Test Modules (push) Has been cancelled
CI / Validate sources (push) Has been cancelled
Release / Make release (push) Has been cancelled
Build & deploy website / Build site (push) Has been cancelled
Build & deploy website / Deploy website (push) Has been cancelled
Release / Publish to Flake registries (push) Has been cancelled
23 lines
578 B
Nix
23 lines
578 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.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}"
|
|
'';
|
|
};
|
|
}
|