From 9779a98f1e1920989c2f879edec79ec34e2cb77a Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Mon, 30 Jan 2023 15:33:50 -0700 Subject: [PATCH] Testing for CI -- revert "Remove activation scripts" This reverts commit 4c315d9683e17b32cc5040cb214310508cee5150. --- modules/age.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/age.nix b/modules/age.nix index 701e101..ec8546f 100644 --- a/modules/age.nix +++ b/modules/age.nix @@ -276,6 +276,20 @@ in { }; }) (optionalAttrs isDarwin { + system.activationScripts = { + # Secrets with root owner and group can be installed before users + # exist. This allows user password files to be encrypted. + preActivation.text = builtins.concatStringsSep "\n" [ + newGeneration + installSecrets + ]; + + # Other secrets need to wait for users and groups to exist. + users.text = lib.mkAfter '' + ${chownSecrets} + ''; + }; + launchd.daemons.activate-agenix = { script = '' set -e