2021-04-22 17:52:39 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
2022-01-11 16:08:21 +01:00
|
|
|
inherit (lib)
|
|
|
|
mkEnableOption
|
|
|
|
mkIf
|
|
|
|
;
|
|
|
|
|
2021-04-22 17:52:39 +02:00
|
|
|
cfg = config.my.home.fish;
|
|
|
|
in
|
|
|
|
{
|
2022-01-11 16:08:21 +01:00
|
|
|
options.my.home.fish.enable = (mkEnableOption "Fish shell") // { default = true; };
|
2021-04-22 17:52:39 +02:00
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2021-04-22 17:52:39 +02:00
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
xdg.configFile."fish/functions" = { source = ./. + "/functions"; };
|
|
|
|
};
|
|
|
|
}
|