Added shell alias configuration

This commit is contained in:
Jan-Bulthuis 2024-12-02 00:54:05 +01:00
parent 3b071a8118
commit 891fa64466
3 changed files with 26 additions and 1 deletions

View File

@ -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;
};
}

View File

@ -0,0 +1,19 @@
{
pkgs,
lib,
config,
...
}:
with lib;
{
options.modules.shell = {
aliases = mkOption {
type = types.attrsOf types.str;
default = {
"..." = "cd ../..";
};
description = "Shell aliases";
};
};
}

View File

@ -36,6 +36,8 @@ in
programs.fish = {
enable = true;
shellAliases = config.modules.shell.aliases;
plugins = [
(mkIf cfg.plugins.done {
name = "done";