fix: secret symlink on launchctl

This commit is contained in:
Rasyidan Akbar F. 2026-03-29 14:09:27 +07:00
commit 70620411af
2 changed files with 11 additions and 10 deletions

View file

@ -74,10 +74,11 @@ in
generateKey = true;
};
# Ensure the LaunchAgent on macOS can find `getconf` (needed by
# sops-install-secrets to resolve DARWIN_USER_TEMP_DIR).
# Without this, age.plugins produces an empty PATH.
environment.PATH = lib.mkForce "/usr/bin";
# The LaunchAgent runs with a minimal PATH. sops-install-secrets needs:
# /usr/bin getconf (resolves DARWIN_USER_TEMP_DIR)
# /usr/sbin diskutil (RAM disk management)
# /sbin newfs_hfs (creates the HFS RAM disk for decrypted secrets)
environment.PATH = lib.mkForce "/usr/bin:/usr/sbin:/sbin";
secrets = lib.mapAttrs sanitizeSecret cfg.secrets;
}