1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2024-12-14 11:57:52 +00:00
sops-nix/modules/nix-darwin/with-environment.nix
2024-11-17 12:22:59 +01:00

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}
)
''