mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
33 lines
635 B
Nix
33 lines
635 B
Nix
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.deploy.tf;
|
|
unmergedValues = types.mkOptionType {
|
|
name = "unmergedValues";
|
|
merge = loc: defs: map (def: def.value) defs;
|
|
};
|
|
in {
|
|
|
|
options.deploy.tf = mkOption {
|
|
type = types.submodule {
|
|
freeformType = types.attrsOf unmergedValues;
|
|
|
|
options = {
|
|
attrs = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [ ];
|
|
};
|
|
out.set = mkOption { type = types.unspecified; };
|
|
};
|
|
};
|
|
|
|
};
|
|
config = {
|
|
deploy.tf = {
|
|
attrs = [ "out" "attrs" ];
|
|
out.set = removeAttrs cfg cfg.attrs;
|
|
};
|
|
};
|
|
}
|