mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 00:39:45 +01:00
zsh: fix HISTSIZE and HISTFILE configuration
HISTSIZE and HISTFILE should be set in ~/.zshrc and before sourcing oh-my-zsh since otherwise it will be overridden. Fixes #177.
This commit is contained in:
parent
d6ab6ee370
commit
dbcb3dd1ae
1 changed files with 5 additions and 5 deletions
|
@ -238,11 +238,6 @@ in
|
||||||
++ optional cfg.enableCompletion nix-zsh-completions
|
++ optional cfg.enableCompletion nix-zsh-completions
|
||||||
++ optional cfg.oh-my-zsh.enable oh-my-zsh;
|
++ optional cfg.oh-my-zsh.enable oh-my-zsh;
|
||||||
|
|
||||||
programs.zsh.sessionVariables = {
|
|
||||||
HISTSIZE = cfg.history.size;
|
|
||||||
HISTFILE = "$HOME/" + cfg.history.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file."${relToDotDir ".zshenv"}".text = ''
|
home.file."${relToDotDir ".zshenv"}".text = ''
|
||||||
typeset -U fpath
|
typeset -U fpath
|
||||||
${optionalString (config.home.sessionVariableSetter != "pam") ''
|
${optionalString (config.home.sessionVariableSetter != "pam") ''
|
||||||
|
@ -289,6 +284,11 @@ in
|
||||||
source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}"
|
source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}"
|
||||||
'') cfg.plugins)}
|
'') cfg.plugins)}
|
||||||
|
|
||||||
|
# HISTSIZE, HISTFILE have to be set in .zshrc and after oh-my-zsh sourcing
|
||||||
|
# see https://github.com/rycee/home-manager/issues/177
|
||||||
|
HISTSIZE="${toString cfg.history.size}"
|
||||||
|
HISTFILE="$HOME/${cfg.history.path}"
|
||||||
|
|
||||||
${cfg.initExtra}
|
${cfg.initExtra}
|
||||||
|
|
||||||
${aliasesStr}
|
${aliasesStr}
|
||||||
|
|
Loading…
Reference in a new issue