nixos-config/home/fish/default.nix

27 lines
536 B
Nix
Raw Normal View History

{ config, lib, ... }:
let
2022-01-11 16:08:21 +01:00
inherit (lib)
mkEnableOption
mkIf
;
cfg = config.my.home.fish;
in
{
2022-01-11 16:08:21 +01:00
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;
};
xdg.configFile."fish/functions" = { source = ./. + "/functions"; };
};
}