From da763b2c4bfac0310e8c1d972199e10967ad38b8 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Fri, 15 Sep 2023 16:22:30 -0600 Subject: [PATCH] Don't need concatStringSep if using jq to parse json arrays --- pkgs/agenix.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/agenix.sh b/pkgs/agenix.sh index 7b2045f..5980fe6 100644 --- a/pkgs/agenix.sh +++ b/pkgs/agenix.sh @@ -115,7 +115,7 @@ function cleanup { trap "cleanup" 0 2 3 15 function keys { - (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in builtins.concatStringsSep \"\n\" rules.\"$FILE\".publicKeys)" | @jqBin@ -r .[]) || exit 1 + (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in rules.\"$FILE\".publicKeys)" | @jqBin@ -r .[]) || exit 1 } function decrypt { @@ -185,7 +185,7 @@ function edit { } function rekey { - FILES=$( (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in builtins.concatStringsSep \"\n\" (builtins.attrNames rules))" | @jqBin@ -r .[]) || exit 1) + FILES=$( (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in builtins.attrNames rules)" | @jqBin@ -r .[]) || exit 1) for FILE in $FILES do