From 725e034355054a516df34b55ec05882beb643abe Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Mon, 21 Jul 2025 22:11:17 +0200 Subject: [PATCH] type: swap out nixops4 deployments for raw nixos modules --- deployment/data-model-test.nix | 8 +------- deployment/data-model.nix | 16 ++++------------ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/deployment/data-model-test.nix b/deployment/data-model-test.nix index 1588203d..7ca1df04 100644 --- a/deployment/data-model-test.nix +++ b/deployment/data-model-test.nix @@ -7,15 +7,12 @@ let (lib.evalModules { specialArgs = { inherit inputs; - # to be passed to nixops4Deployment - resourceProviderSystem = builtins.currentSystem; }; modules = [ module ./data-model.nix ]; }).config; - nixops4Deployment = import ./deployment.nix { inherit inputs; }; in { test-eval = { @@ -171,10 +168,7 @@ in }; }; example-deployment = mkOption { - type = types.submoduleWith { - class = "nixops4Deployment"; - modules = [ nixops4Deployment ]; - }; + type = types.raw; readOnly = true; default = config.environments.single-nixos-vm.deployment config.example-configuration; }; diff --git a/deployment/data-model.nix b/deployment/data-model.nix index 948b8e2f..08f50279 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -1,7 +1,6 @@ { lib, config, - inputs, ... }: let @@ -13,11 +12,10 @@ let submoduleWith optionType functionTo + raw ; functionType = import ./function.nix; - nixops4Deployment = import ./deployment.nix { inherit inputs; }; - configuration = mkOption { description = "Configuration type declaring options to be set by operators"; type = optionType; @@ -146,10 +144,7 @@ in }; implementation = mkOption { description = "Mapping of resources required by applications to available resources; the result can be deployed"; - type = functionTo (submoduleWith { - class = "nixops4Deployment"; - modules = [ environment.config.resource-mapping.output-type ]; - }); + type = functionTo environment.config.resource-mapping.output-type; }; resource-mapping = mkOption { description = "Function type for the mapping from resources to a (NixOps4) deployment"; @@ -160,15 +155,12 @@ in readOnly = true; default = { input-type = configuration; - output-type = nixops4Deployment; + output-type = raw; }; }; deployment = mkOption { description = "Generate a deployment from a configuration"; - type = functionTo (submoduleWith { - class = "nixops4Deployment"; - modules = [ environment.config.resource-mapping.output-type ]; - }); + type = functionTo (submodule environment.config.resource-mapping.output-type); readOnly = true; default = cfg: