rose-pine-nix/modules/home-manager/fish.nix
2024-05-21 22:53:46 +01:00

20 lines
541 B
Nix

{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.programs.fish.catppuccin;
enable = cfg.enable && config.programs.fish.enable;
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}";
themePath = "/themes/${themeName}.theme";
in
{
options.programs.fish.catppuccin = lib.ctp.mkCatppuccinOpt "fish";
config = lib.mkIf enable {
xdg.configFile."fish${themePath}".source = "${sources.fish}${themePath}";
programs.fish.shellInit = ''
fish_config theme choose "${themeName}"
'';
};
}