fix(hosts/global/persistence): try and fix /var/lib/private permissions

This commit is contained in:
Gabriel Fontes
2026-06-29 17:51:51 -03:00
parent 85892ad024
commit a7970fc4c5
+13 -1
View File
@@ -25,7 +25,19 @@
];
};
};
programs.fuse.userAllowOther = true;
# Borrowed snippet from davisschenk/nixos-homelab - thanks!
#
# DynamicUser=true services require /var/lib/private to be mode 0700.
# Impermanence resets it to 0755 on each activation, and systemd-tmpfiles-resetup
# has RemainAfterExit=true so it won't re-run on subsequent switches to fix it.
# Fix: force RemainAfterExit=false so tmpfiles re-runs every activation, and
# also enforce the correct mode on the persist source so impermanence copies 0700.
# See: https://github.com/nix-community/impermanence/issues/254
systemd.tmpfiles.rules = [
"d /persist/var/lib/private 0700 root root -"
"e /var/lib/private 0700 root root -"
];
systemd.services."systemd-tmpfiles-resetup".serviceConfig.RemainAfterExit = lib.mkForce false; programs.fuse.userAllowOther = true;
system.activationScripts.persistent-dirs.text = let
mkHomePersist = user: