diff --git a/modules/users/modules/shell/bash.nix b/modules/users/modules/shell/bash.nix index d71f5f9..c391b33 100644 --- a/modules/users/modules/shell/bash.nix +++ b/modules/users/modules/shell/bash.nix @@ -14,5 +14,9 @@ in enable = mkEnableOption "bash"; }; - config.programs.bash.enable = cfg.enable; + config.programs.bash = { + enable = cfg.enable; + + shellAliases = config.modules.shell.aliases; + }; } diff --git a/modules/users/modules/shell/default.nix b/modules/users/modules/shell/default.nix new file mode 100644 index 0000000..5ade290 --- /dev/null +++ b/modules/users/modules/shell/default.nix @@ -0,0 +1,19 @@ +{ + pkgs, + lib, + config, + ... +}: + +with lib; +{ + options.modules.shell = { + aliases = mkOption { + type = types.attrsOf types.str; + default = { + "..." = "cd ../.."; + }; + description = "Shell aliases"; + }; + }; +} diff --git a/modules/users/modules/shell/fish.nix b/modules/users/modules/shell/fish.nix index 343fdf7..e020d43 100644 --- a/modules/users/modules/shell/fish.nix +++ b/modules/users/modules/shell/fish.nix @@ -36,6 +36,8 @@ in programs.fish = { enable = true; + shellAliases = config.modules.shell.aliases; + plugins = [ (mkIf cfg.plugins.done { name = "done";