mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 20:39:18 -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;
|
|
};
|
|
}
|