nixos-config/home/fish/default.nix

40 lines
850 B
Nix
Raw Permalink 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;
shellAliases = {
"bt" = "bluetoothctl";
};
shellAbbrs = {
"bton" = "bluetoothctl power on";
"btoff" = "bluetoothctl power off";
"btcon" = "bluetoothctl connect";
"btdis" = "bluetoothctl disconnect";
"btinfo" = "bluetoothctl info";
};
};
2022-04-10 11:54:58 +02:00
xdg.configFile."fish/functions" = {source = ./. + "/functions";};
};
}