initial commit
This commit is contained in:
43
users/modules/shell/bash.nix
Normal file
43
users/modules/shell/bash.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.bash;
|
||||
in {
|
||||
options.modules.bash = {
|
||||
enable = lib.mkEnableOption "enables bash";
|
||||
aliases = lib.mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = {};
|
||||
example = {
|
||||
cp = "cp -i";
|
||||
lns = "ln -si";
|
||||
};
|
||||
};
|
||||
bashrcExtra = lib.mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = cfg.aliases;
|
||||
shellOptions = [
|
||||
"histappend"
|
||||
"cmdhist"
|
||||
"lithist"
|
||||
"checkwinsize"
|
||||
"extglob"
|
||||
"globstar"
|
||||
"checkjobs"
|
||||
"autocd"
|
||||
"cdspell"
|
||||
"dirspell"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user