37 lines
887 B
Nix
37 lines
887 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.sydnix.users.msyds.bash;
|
|
in {
|
|
options.sydnix.users.msyds.bash.enable =
|
|
lib.mkEnableOption "Bash, à la msyds";
|
|
config = lib.mkIf cfg.enable {
|
|
sydnix.bash.enable = true;
|
|
sydnix.bash.complete-alias.enable = true;
|
|
|
|
programs.bash.shellOptions = [
|
|
# Correct minor typos in cd commands.
|
|
"cdspell"
|
|
# Implicitly prepend `cd` to directory names.
|
|
"autocd"
|
|
# Extra glob power.
|
|
"extglob"
|
|
# Recursive glob w/ **.
|
|
"globstar"
|
|
# Append to history file.
|
|
"histappend"
|
|
# Require user confirmation for commands using expansion.
|
|
"histverify"
|
|
# Re-edit failed history substitutions.
|
|
"histreedit"
|
|
];
|
|
|
|
home.shellAliases = {
|
|
nix2json = "nix eval --impure --json --file -";
|
|
"..." = "cd ../..";
|
|
"...." = "cd ../../..";
|
|
};
|
|
};
|
|
}
|
|
|