21 lines
486 B
Nix
21 lines
486 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
cfg = config.az.tc;
|
|
in {
|
|
imports = [./staging.nix ./production.nix];
|
|
|
|
options.az.tc.site = lib.mkOption {
|
|
type = lib.types.enum ["staging" "production"];
|
|
default = "staging";
|
|
description = "Site profile providing fleet-wide infrastructure defaults.";
|
|
};
|
|
|
|
config.assertions = lib.optional cfg.enable {
|
|
assertion = builtins.elem cfg.site ["staging" "production"];
|
|
message = "az.tc.site must be staging or production.";
|
|
};
|
|
}
|