mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
13 lines
449 B
Nix
13 lines
449 B
Nix
{ config, lib, meta, ... }: with lib; {
|
|
config = mkIf (config.secrets.variables != { }) {
|
|
deploy.tf.variables = mapAttrs'
|
|
(name: content:
|
|
nameValuePair name ({
|
|
value.shellCommand = "${meta.secrets.command} ${content.path}" + optionalString (content.field != "") " -f ${content.field}";
|
|
type = "string";
|
|
sensitive = true;
|
|
})
|
|
)
|
|
config.secrets.variables;
|
|
};
|
|
}
|