mirror of
https://github.com/Mic92/sops-nix.git
synced 2024-12-14 11:57:52 +00:00
14 lines
253 B
Nix
14 lines
253 B
Nix
{ cfg, lib }:
|
|
|
|
sopsCall:
|
|
|
|
if cfg.environment == { } then
|
|
sopsCall
|
|
else
|
|
''
|
|
(
|
|
# shellcheck disable=SC2030,SC2031
|
|
${lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: " export ${n}='${v}'") cfg.environment)}
|
|
${sopsCall}
|
|
)
|
|
''
|