From ea259bb80ba3b6618b52d1239fe64bcfed5f2c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Gro=C3=9Fmann?= Date: Sun, 17 Dec 2023 18:59:29 +0100 Subject: [PATCH] fix: do not fix agenix when there is no agenix --- modules/config/system.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/config/system.nix b/modules/config/system.nix index 23b4931..083121a 100644 --- a/modules/config/system.nix +++ b/modules/config/system.nix @@ -33,9 +33,9 @@ # to create a link called /run/agenix. Agenix should probably fail in this case, # but doesn't and instead puts the generation link into the existing directory. # TODO See https://github.com/ryantm/agenix/pull/187. - system.activationScripts = { + system.activationScripts = lib.mkIf (config.age.secrets != {}) { removeAgenixLink.text = "[[ ! -L /run/agenix ]] && [[ -d /run/agenix ]] && rm -rf /run/agenix"; - #agenixNewGeneration.deps = ["removeAgenixLink"]; + agenixNewGeneration.deps = ["removeAgenixLink"]; }; time.timeZone = lib.mkDefault "Europe/Berlin";