nixos-config/home/fish/default.nix

30 lines
544 B
Nix
Raw Normal View History

2022-04-10 11:54:58 +02:00
{
config,
lib,
...
}: let
inherit
(lib)
2022-01-11 16:08:21 +01:00
mkEnableOption
mkIf
2022-04-10 11:54:58 +02:00
;
2022-01-11 16:08:21 +01:00
cfg = config.my.home.fish;
2022-04-10 11:54:58 +02:00
in {
options.my.home.fish.enable = (mkEnableOption "Fish shell") // {default = true;};
2022-01-11 16:08:21 +01:00
config = mkIf cfg.enable {
2022-03-30 12:40:35 +02:00
home.sessionVariables = {
# automatically prompt to run program in nix-shell if it's not installed
NIX_AUTO_RUN = "1";
NIX_AUTO_RUN_INTERACTIVE = "1";
};
programs.fish = {
enable = true;
};
2022-04-10 11:54:58 +02:00
xdg.configFile."fish/functions" = {source = ./. + "/functions";};
};
}