infrastructure/config/modules/nixos/secrets.nix
2021-08-18 02:25:15 +01:00

15 lines
303 B
Nix

{ config, lib, ... }:
with lib;
{
options.kw = {
secrets = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
};
};
config = mkIf (config.kw.secrets != null) {
deploy.tf.variables = genAttrs config.kw.secrets (n: { externalSecret = true; });
};
}