impermenance: fix zsh history file
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7f25cab5f8
commit
5e725b14bb
@ -58,23 +58,28 @@ in
|
||||
mkUser = (x: {
|
||||
name = x;
|
||||
value = {
|
||||
home.persistence."/data/users/${x}" = {
|
||||
home = {
|
||||
persistence."/data/users/${x}" = {
|
||||
allowOther = false;
|
||||
|
||||
files = [
|
||||
".zsh_history"
|
||||
] ++ cfg.userExtraFiles.${x} or [ ];
|
||||
|
||||
files = cfg.userExtraFiles.${x} or [ ];
|
||||
directories = cfg.userExtraDirs.${x} or [ ];
|
||||
};
|
||||
file.".zshrc".text = lib.mkForce ''
|
||||
HISTFILE=/data/users/${x}/.zsh_history
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
in
|
||||
builtins.listToAttrs (builtins.map mkUser cfg.users);
|
||||
|
||||
systemd.tmpfiles.rules = builtins.map
|
||||
systemd.tmpfiles.rules = lib.lists.flatten (builtins.map
|
||||
(user:
|
||||
let details = config.users.users.${user}; in "L ${details.home}/local - ${user} ${details.group} - /data/users/${user}")
|
||||
cfg.users;
|
||||
let details = config.users.users.${user}; in [
|
||||
"d /data/users/${user} 0700 ${user} ${details.group} - -"
|
||||
"L ${details.home}/local - ${user} ${details.group} - /data/users/${user}"
|
||||
])
|
||||
cfg.users);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user