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
25 lines
610 B
Nix
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}"
|
|
'';
|
|
};
|
|
}
|