fix(nixos): preserve operator home traverse ACL after users activation
Core Architecture & Invariant CI / validate (push) Successful in 27m51s
Core Architecture & Invariant CI / validate (push) Successful in 27m51s
- Add system.activationScripts.homelabHomeAcl ordered after users activation - Re-applies u:homelab-appctl:x,g:homelab-operators:x,m::rx on /home/<operatorUser> - Prevents nixos-rebuild switch from resetting POSIX ACL mask::--- via chmod 0700 and causing homelab-appctl 200/CHDIR failures
This commit is contained in:
1 parent
365801a169
commit
648dd49c82
1 file changed
+7
@@ -44,6 +44,13 @@
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Re-apply home-dir traverse ACL after `users` activation (chmod 0700 resets POSIX ACL mask::---)
|
||||||
|
system.activationScripts.homelabHomeAcl = lib.stringAfter [ "users" ] ''
|
||||||
|
if [ -d "/home/${config.homelab.operatorUser}" ]; then
|
||||||
|
${pkgs.acl}/bin/setfacl -m u:homelab-appctl:x,g:homelab-operators:x,m::rx "/home/${config.homelab.operatorUser}"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
# Define the keys to decrypt from secrets.yaml
|
# Define the keys to decrypt from secrets.yaml
|
||||||
sops.secrets = (lib.genAttrs [
|
sops.secrets = (lib.genAttrs [
|
||||||
"dynu/api_key"
|
"dynu/api_key"
|
||||||
|
|||||||
Reference in new issue
Block a user