diff --git a/deployment/check/data-model-basic/nixosTest.nix b/deployment/check/data-model-basic/nixosTest.nix index eb654317..52d715af 100644 --- a/deployment/check/data-model-basic/nixosTest.nix +++ b/deployment/check/data-model-basic/nixosTest.nix @@ -18,17 +18,13 @@ in { imports = [ ../common/model.nix ]; options = { - default = - let - env = config.environments.default; - in - mkOption { - type = env.resource-mapping.output-type; - default = env.deployment { - deployment-name = "default"; - configuration = config."example-configuration"; - }; + default = mkOption { + type = config.deployment-type; + default = config.environments.default.deployment { + deployment-name = "default"; + configuration = config."example-configuration"; }; + }; deploy = mkOption { default = config.default.ssh-host.run; }; diff --git a/deployment/check/data-model-nixops4/data-model.nix b/deployment/check/data-model-nixops4/data-model.nix index a1b9a3d3..34fe4b4d 100644 --- a/deployment/check/data-model-nixops4/data-model.nix +++ b/deployment/check/data-model-nixops4/data-model.nix @@ -55,16 +55,12 @@ in }; }; }; - options.default = - let - env = config.environments.default; - in - lib.mkOption { - type = env.resource-mapping.output-type; - default = env.deployment { - deployment-name = "default"; - configuration = config."example-configuration"; - }; + options.default = lib.mkOption { + type = config.deployment-type; + default = config.environments.default.deployment { + deployment-name = "default"; + configuration = config."example-configuration"; }; + }; } ) diff --git a/deployment/check/data-model-ssh/data-model.nix b/deployment/check/data-model-ssh/data-model.nix index 91aa69b1..af16c404 100644 --- a/deployment/check/data-model-ssh/data-model.nix +++ b/deployment/check/data-model-ssh/data-model.nix @@ -9,6 +9,7 @@ let inherit (sources) nixpkgs; pkgs = import nixpkgs { inherit system; }; inherit (pkgs) lib; + inherit (lib) mkOption; inherit (pkgs.callPackage ../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration; inherit (config) nodeName @@ -52,16 +53,14 @@ in }; }; }; - options.default = - let - env = config.environments.default; - in - lib.mkOption { - type = env.resource-mapping.output-type; - default = env.deployment { + options = { + default = mkOption { + type = config.deployment-type; + default = config.environments.default.deployment { deployment-name = "default"; configuration = config."example-configuration"; }; }; + }; } ) diff --git a/deployment/check/data-model-tf-proxmox/setups/template.nix b/deployment/check/data-model-tf-proxmox/setups/template.nix index 983ef8c9..871fa81b 100644 --- a/deployment/check/data-model-tf-proxmox/setups/template.nix +++ b/deployment/check/data-model-tf-proxmox/setups/template.nix @@ -9,6 +9,7 @@ let inherit (sources) nixpkgs; pkgs = import nixpkgs { inherit system; }; inherit (pkgs) lib; + inherit (lib) mkOption; inherit (pkgs.callPackage ../../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration; inherit (config) nodeName @@ -54,17 +55,15 @@ in }; }; }; - options.default = - let - env = config.environments.default; - in - lib.mkOption { - type = env.resource-mapping.output-type; - default = env.deployment { + options = { + default = mkOption { + type = config.deployment-type; + default = config.environments.default.deployment { deployment-name = "default"; # normally our template is distinct, but our test cannot download build deps due to sandboxing configuration = config."example-configuration"; }; }; + }; } ) diff --git a/deployment/check/data-model-tf-proxmox/setups/vm.nix b/deployment/check/data-model-tf-proxmox/setups/vm.nix index 167eb8e3..ca0cd837 100644 --- a/deployment/check/data-model-tf-proxmox/setups/vm.nix +++ b/deployment/check/data-model-tf-proxmox/setups/vm.nix @@ -9,6 +9,7 @@ let inherit (sources) nixpkgs; pkgs = import nixpkgs { inherit system; }; inherit (pkgs) lib; + inherit (lib) mkOption; inherit (pkgs.callPackage ../../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration; inherit (config) nodeName @@ -81,16 +82,14 @@ in }; }; }; - options.default = - let - env = config.environments.default; - in - lib.mkOption { - type = env.resource-mapping.output-type; - default = env.deployment { + options = { + default = mkOption { + type = config.deployment-type; + default = config.environments.default.deployment { deployment-name = "default"; configuration = config."example-configuration"; }; }; + }; } ) diff --git a/deployment/check/data-model-tf/data-model.nix b/deployment/check/data-model-tf/data-model.nix index 32441f0e..929db61a 100644 --- a/deployment/check/data-model-tf/data-model.nix +++ b/deployment/check/data-model-tf/data-model.nix @@ -9,6 +9,7 @@ let inherit (sources) nixpkgs; pkgs = import nixpkgs { inherit system; }; inherit (pkgs) lib; + inherit (lib) mkOption; inherit (pkgs.callPackage ../common/utils.nix { inherit modulesPath; }) mkNixosConfiguration; inherit (config) nodeName @@ -52,16 +53,14 @@ in }; }; }; - options.default = - let - env = config.environments.default; - in - lib.mkOption { - type = env.resource-mapping.output-type; - default = env.deployment { + options = { + default = mkOption { + type = config.deployment-type; + default = config.environments.default.deployment { deployment-name = "default"; configuration = config."example-configuration"; }; }; + }; } ) diff --git a/deployment/data-model.nix b/deployment/data-model.nix index b46c98b3..561fc343 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -32,6 +32,9 @@ let in { options = { + deployment-type = mkOption { + default = deployment-type; + }; resources = mkOption { description = "Collection of deployment resources that can be required by applications and policed by hosting providers"; type = attrsOf (