From 35ecba57048d8c4bd4268872c456b1ff8245a138 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 6 Jan 2022 22:55:10 +0100 Subject: [PATCH] Do not try to create /run/agenix in when installing secrets That is a job for agenixMountSecrets, which should have already created a symlink there so the directory creation attempt would fail anyway. --- modules/age.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/age.nix b/modules/age.nix index 96b8f5f..f20b080 100644 --- a/modules/age.nix +++ b/modules/age.nix @@ -24,7 +24,7 @@ let echo "decrypting '${secretType.file}' to '$_truePath'..." TMP_FILE="$_truePath.tmp" mkdir -p "$(dirname "$_truePath")" - mkdir -p "$(dirname "${secretType.path}")" + [ "${secretType.path}" != "/run/agenix/${secretType.name}" ] && mkdir -p "$(dirname "${secretType.path}")" ( umask u=r,g=,o= LANG=${config.i18n.defaultLocale} ${ageBin} --decrypt ${identities} -o "$TMP_FILE" "${secretType.file}"