Split out hm/common
I went nuclear...
This commit is contained in:
parent
033f411060
commit
4412180b3a
17 changed files with 345 additions and 307 deletions
38
hm/shell/default.nix
Normal file
38
hm/shell/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ 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;
|
||||
# TODO Check out Atuin
|
||||
historyControl = [ "erasedups" "ignoredups" "ignorespace" ];
|
||||
};
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue