50 lines
1 KiB
Nix
50 lines
1 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.programs.bash;
|
|
in
|
|
{
|
|
config = {
|
|
programs = {
|
|
bash = {
|
|
enable = true;
|
|
bashrcExtra = ''
|
|
shopt -s expand_aliases
|
|
shopt -s histappend
|
|
'';
|
|
historySize = 100000;
|
|
historyFile = "${config.xdg.stateHome}/shell_history";
|
|
historyFileSize = 100000;
|
|
historyControl = [
|
|
"erasedups"
|
|
"ignoredups"
|
|
"ignorespace"
|
|
];
|
|
};
|
|
zsh = {
|
|
enable = true;
|
|
autosuggestion.enable = true;
|
|
enableCompletion = true;
|
|
syntaxHighlighting.enable = true;
|
|
historySubstringSearch.enable = true;
|
|
initExtra = builtins.readFile ./zshrc.sh;
|
|
defaultKeymap = "viins";
|
|
history = {
|
|
size = cfg.historySize;
|
|
save = cfg.historyFileSize;
|
|
path = cfg.historyFile;
|
|
expireDuplicatesFirst = true;
|
|
};
|
|
shellAliases = cfg.shellAliases;
|
|
};
|
|
};
|
|
};
|
|
imports = [
|
|
./atuin.nix
|
|
];
|
|
}
|