nixfmt
This commit is contained in:
parent
d1a24c3ff8
commit
96f574bbff
1 changed files with 9 additions and 4 deletions
|
|
@ -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 =
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue