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: {
|
mkUser = (x: {
|
||||||
name = x;
|
name = x;
|
||||||
value = {
|
value = {
|
||||||
home.persistence."/data/users/${x}" = {
|
home = {
|
||||||
allowOther = false;
|
persistence."/data/users/${x}" = {
|
||||||
|
allowOther = false;
|
||||||
|
|
||||||
files = [
|
files = cfg.userExtraFiles.${x} or [ ];
|
||||||
".zsh_history"
|
directories = cfg.userExtraDirs.${x} or [ ];
|
||||||
] ++ cfg.userExtraFiles.${x} or [ ];
|
};
|
||||||
|
file.".zshrc".text = lib.mkForce ''
|
||||||
directories = cfg.userExtraDirs.${x} or [ ];
|
HISTFILE=/data/users/${x}/.zsh_history
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
builtins.listToAttrs (builtins.map mkUser cfg.users);
|
builtins.listToAttrs (builtins.map mkUser cfg.users);
|
||||||
|
|
||||||
systemd.tmpfiles.rules = builtins.map
|
systemd.tmpfiles.rules = lib.lists.flatten (builtins.map
|
||||||
(user:
|
(user:
|
||||||
let details = config.users.users.${user}; in "L ${details.home}/local - ${user} ${details.group} - /data/users/${user}")
|
let details = config.users.users.${user}; in [
|
||||||
cfg.users;
|
"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