diff --git a/infra/common/options.nix b/infra/common/options.nix index 39c2e1d2..4ea5e62e 100644 --- a/infra/common/options.nix +++ b/infra/common/options.nix @@ -2,6 +2,7 @@ let inherit (lib) mkOption; + inherit (lib.types) types; in { @@ -13,6 +14,29 @@ in ''; }; + proxmox = mkOption { + type = types.nullOr ( + types.enum [ + "procolix" + "fediversity" + ] + ); + description = '' + The Proxmox instance. This is used for provisioning only and should be + set to `null` if the machine is not a VM. + ''; + }; + + vmId = mkOption { + # REVIEW: There is `types.ints.between` but maybe not `types.ints.above`? + type = types.nullOr (types.addCheck types.int (x: x >= 100)); + description = '' + The id of the machine in the corresponding Proxmox. This is used for + provisioning only and should be set to `null` if the machine is not a + VM. + ''; + }; + domain = mkOption { description = '' The domain hosting the machine. Most of the time, this will be either of diff --git a/infra/fedi200/default.nix b/infra/fedi200/default.nix index b8db0479..db9950ea 100644 --- a/infra/fedi200/default.nix +++ b/infra/fedi200/default.nix @@ -1,5 +1,7 @@ { fediversityVm = { + vmId = 200; + proxmox = "fediversity"; domain = "abundos.eu"; ipv4 = { address = "95.215.187.200";