mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
fix(hosts/global/persistence): try and fix /var/lib/private permissions
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user