dotfiles/hm/shell/default.nix

50 lines
1 KiB
Nix
Raw Normal View History

2024-12-15 00:29:51 +01:00
{
pkgs,
lib,
config,
...
}:
2024-01-11 23:54:03 +01:00
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;
2024-12-15 00:29:51 +01:00
historyControl = [
"erasedups"
"ignoredups"
"ignorespace"
];
2024-01-11 23:54:03 +01:00
};
zsh = {
enable = true;
2024-06-01 21:32:11 +02:00
autosuggestion.enable = true;
2024-01-11 23:54:03 +01:00
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;
};
};
};
2024-06-20 20:43:54 +02:00
imports = [
./atuin.nix
2024-12-15 00:29:51 +01:00
];
2024-01-11 23:54:03 +01:00
}