fix: do not fix agenix when there is no agenix

This commit is contained in:
Patrick Großmann 2023-12-17 18:59:29 +01:00
parent d26489f3d6
commit ea259bb80b
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F

View file

@ -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";