This commit is contained in:
Dmitry 2026-06-04 11:19:20 +01:00
parent d1a24c3ff8
commit 96f574bbff

View file

@ -1,7 +1,12 @@
{ pkgs, lib }: { pkgs, lib }:
let let
inherit (builtins) isAttrs hasAttr; inherit (builtins) isAttrs hasAttr;
inherit (lib) any concatMapStringsSep concatStringsSep escapeShellArg; inherit (lib)
any
concatMapStringsSep
concatStringsSep
escapeShellArg
;
shb = rec { shb = rec {
# Replace secrets in a file. # Replace secrets in a file.
# - userConfig is an attrset that will produce a config file. # - userConfig is an attrset that will produce a config file.
@ -54,9 +59,9 @@ let
}: }:
if isNull transform then x: x else transform; if isNull transform then x: x else transform;
in in
lib.attrsets.nameValuePair lib.attrsets.nameValuePair (secretName secret.name) (
(secretName secret.name) (t secret) "$(cat ${escapeShellArg (toString secret.source)})"
((t secret) "$(cat ${escapeShellArg (toString secret.source)})"); );
replaceSecretsScript = replaceSecretsScript =
{ {