refactor: move default home impermanence dirs to modules/universal/users.nix
This commit is contained in:
parent
55cbce17c2
commit
0753aa59e9
|
@ -38,18 +38,7 @@ in
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable {
|
||||||
sane.image.extraDirectories = [ "/nix/persist/var/log" ];
|
sane.image.extraDirectories = [ "/nix/persist/var/log" ];
|
||||||
environment.persistence."/nix/persist" = {
|
environment.persistence."/nix/persist" = {
|
||||||
directories = (map-home-dirs ([
|
directories = (map-home-dirs cfg.home-dirs) ++ (map-sys-dirs [
|
||||||
# cache is probably too big to fit on the tmpfs
|
|
||||||
# TODO: we could bind-mount it to something which gets cleared per boot, though.
|
|
||||||
".cache"
|
|
||||||
".cargo"
|
|
||||||
".rustup"
|
|
||||||
".ssh"
|
|
||||||
".local/share/keyrings"
|
|
||||||
# intentionally omitted:
|
|
||||||
# ".config" # managed by home-manager
|
|
||||||
# ".local" # nothing useful in here
|
|
||||||
] ++ cfg.home-dirs)) ++ (map-sys-dirs [
|
|
||||||
# TODO: this `0700` here clobbers the perms for /persist/etc, breaking boot on freshly-deployed devices
|
# TODO: this `0700` here clobbers the perms for /persist/etc, breaking boot on freshly-deployed devices
|
||||||
# { mode = "0700"; directory = "/etc/NetworkManager/system-connections"; }
|
# { mode = "0700"; directory = "/etc/NetworkManager/system-connections"; }
|
||||||
# "/etc/nixos"
|
# "/etc/nixos"
|
||||||
|
|
|
@ -67,6 +67,16 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sane.impermanence.home-dirs = [
|
||||||
|
# cache is probably too big to fit on the tmpfs
|
||||||
|
# TODO: we could bind-mount it to something which gets cleared per boot, though.
|
||||||
|
".cache"
|
||||||
|
".cargo"
|
||||||
|
".rustup"
|
||||||
|
".ssh"
|
||||||
|
".local/share/keyrings"
|
||||||
|
];
|
||||||
|
|
||||||
sane.impermanence.service-dirs = mkIf cfg.guest.enable [
|
sane.impermanence.service-dirs = mkIf cfg.guest.enable [
|
||||||
{ user = "guest"; group = "users"; directory = "/home/guest"; }
|
{ user = "guest"; group = "users"; directory = "/home/guest"; }
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user