mirror of
https://github.com/Mic92/sops-nix.git
synced 2024-12-14 11:57:52 +00:00
don't substitute binaries
This commit is contained in:
parent
f995ea1592
commit
7711514b85
1 changed files with 3 additions and 2 deletions
|
@ -90,11 +90,12 @@ in {
|
|||
tpl = config.sops.templates.${name};
|
||||
substitute = pkgs.writers.writePython3 "substitute" { }
|
||||
(readFile ./subs.py);
|
||||
subst-pairs = pkgs.writeText "pairs" (concatMapStringsSep "\n"
|
||||
subst-pairs = pkgs.writeText "pairs" (flip (concatMapStringsSep "\n")
|
||||
(attrNames (filterAttrs (n: v: v ? format && v.format != "binary") config.sops.secrets))
|
||||
(name:
|
||||
"${toString config.sops.placeholder.${name}} ${
|
||||
config.sops.secrets.${name}.path
|
||||
}") (attrNames config.sops.secrets));
|
||||
}"));
|
||||
in ''
|
||||
mkdir -p "${dirOf tpl.path}"
|
||||
(umask 077; ${substitute} ${tpl.file} ${subst-pairs} > ${tpl.path})
|
||||
|
|
Loading…
Reference in a new issue