This commit is contained in:
Alexander Bantyev 2021-06-13 20:56:34 +03:00
parent 03f76257e3
commit 6bd49cd960
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 62 additions and 56 deletions

View File

@ -132,5 +132,11 @@ in {
startAt = cfg.cache.clean.dates; startAt = cfg.cache.clean.dates;
}; };
system.activationScripts = {
homedir.text = builtins.concatStringsSep "\n" (map (dir: ''
mkdir -p ${cfg.persistRoot}${dir}
chown balsoft:users ${cfg.persistRoot}${dir}
'') (builtins.filter (lib.hasPrefix "/home/balsoft") allDirectories));
};
}; };
} }

View File

@ -1,10 +1,10 @@
{ pkgs, config, ... }: { { pkgs, config, lib, ... }: {
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];
environment.sessionVariables.SHELL = "zsh"; environment.sessionVariables.SHELL = "zsh";
# A history file is screwed up otherwise :( # A history file is screwed up otherwise :(
persist.state.directories = [ "/home/balsoft/.config/zsh/history" ]; persist.state.directories = [ "/home/balsoft/.local/share/zsh" ];
home-manager.users.balsoft.programs.zsh = { home-manager.users.balsoft.programs.zsh = {
enable = true; enable = true;
@ -21,7 +21,7 @@
history = rec { history = rec {
size = 1000000; size = 1000000;
save = size; save = size;
path = "$HOME/.config/zsh/history/file"; path = "$HOME/.local/share/zsh/history";
}; };
plugins = [ plugins = [
{ {