Loading nixos/lib/utils.nix +7 −4 Original line number Diff line number Diff line Loading @@ -177,6 +177,7 @@ rec { genJqSecretsReplacementSnippet' = attr: set: output: let secrets = recursiveGetAttrWithJqPrefix set attr; stringOrDefault = str: def: if str == "" then def else str; in '' if [[ -h '${output}' ]]; then rm '${output}' Loading @@ -195,10 +196,12 @@ rec { (attrNames secrets)) + "\n" + "${pkgs.jq}/bin/jq >'${output}' " + lib.escapeShellArg (concatStringsSep + lib.escapeShellArg (stringOrDefault (concatStringsSep " | " (imap1 (index: name: ''${name} = $ENV.secret${toString index}'') (attrNames secrets))) ".") + '' <<'EOF' ${builtins.toJSON set} Loading Loading
nixos/lib/utils.nix +7 −4 Original line number Diff line number Diff line Loading @@ -177,6 +177,7 @@ rec { genJqSecretsReplacementSnippet' = attr: set: output: let secrets = recursiveGetAttrWithJqPrefix set attr; stringOrDefault = str: def: if str == "" then def else str; in '' if [[ -h '${output}' ]]; then rm '${output}' Loading @@ -195,10 +196,12 @@ rec { (attrNames secrets)) + "\n" + "${pkgs.jq}/bin/jq >'${output}' " + lib.escapeShellArg (concatStringsSep + lib.escapeShellArg (stringOrDefault (concatStringsSep " | " (imap1 (index: name: ''${name} = $ENV.secret${toString index}'') (attrNames secrets))) ".") + '' <<'EOF' ${builtins.toJSON set} Loading