Skip to content

Commit b54c712

Browse files
committed
fix: guard agenix install without exiting activation
1 parent 1fe5277 commit b54c712

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

nix/modules/clawdinator.nix

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -528,19 +528,23 @@ in
528528
(secret: "\"${secret.file}\"")
529529
(lib.attrValues config.age.secrets);
530530
in
531-
lib.mkBefore ''
532-
found=0
533-
for file in ${secretFiles}; do
534-
if [ -f "$file" ]; then
535-
found=1
536-
break
531+
lib.mkMerge [
532+
(lib.mkBefore ''
533+
found=0
534+
for file in ${secretFiles}; do
535+
if [ -f "$file" ]; then
536+
found=1
537+
break
538+
fi
539+
done
540+
if [ "$found" -eq 0 ]; then
541+
echo "[agenix] no encrypted secrets present; skipping install"
542+
else
543+
'')
544+
(lib.mkAfter ''
537545
fi
538-
done
539-
if [ "$found" -eq 0 ]; then
540-
echo "[agenix] no encrypted secrets present; skipping install"
541-
exit 0
542-
fi
543-
''
546+
'')
547+
]
544548
);
545549

546550
systemd.tmpfiles.rules = [

0 commit comments

Comments
 (0)