From 1c87dd098694a7bf0a296b5e2eea51e1949716ef Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Fri, 21 Nov 2025 16:35:56 +0100 Subject: [PATCH] remove `readOnly` to facilitate user overrides (#590) Reviewed-on: https://git.fediversity.eu/fediversity/fediversity/pulls/590 --- deployment/data-model.nix | 8 -------- deployment/run/default.nix | 9 --------- 2 files changed, 17 deletions(-) diff --git a/deployment/data-model.nix b/deployment/data-model.nix index 5c518483..b46c98b3 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -94,14 +94,12 @@ in resources = mkOption { description = "Compute resources required by an application"; type = application.config.config-mapping.function-type; - readOnly = true; default = application.config.config-mapping.apply; }; # TODO(@fricklerhandwerk): this needs a better name config-mapping = mkOption { description = "Function type for the mapping from application configuration to required resources"; type = functionType; - readOnly = true; default = { input-type = submodule application.config.module; output-type = application-resources; @@ -138,9 +136,7 @@ in resource-mapping = mkOption { description = "Function type for the mapping from resources to a deployment"; type = functionType; - readOnly = true; default = { - type-output = false; input-type = submodule { options = { deployment-name = mkOption { @@ -158,9 +154,7 @@ in config-mapping = mkOption { description = "Mapping from a configuration to a deployment"; type = functionType; - readOnly = true; default = { - type-output = false; input-type = submodule { options = { deployment-name = mkOption { @@ -192,7 +186,6 @@ in deployment = mkOption { description = "Generate a deployment from a configuration, by applying an environment's resource policies to the applications' resource mappings"; type = environment.config.config-mapping.function-type; - readOnly = true; default = environment.config.config-mapping.apply; }; }; @@ -202,7 +195,6 @@ in configuration = mkOption { description = "Configuration type declaring options to be set by operators"; type = optionType; - readOnly = true; default = submodule { options = { enable = lib.mkEnableOption "your Fediversity configuration"; diff --git a/deployment/run/default.nix b/deployment/run/default.nix index e1e68f8d..3d35d39e 100644 --- a/deployment/run/default.nix +++ b/deployment/run/default.nix @@ -73,7 +73,6 @@ let { options = { value = mkOption { - readOnly = true; default = lib.mapAttrs' (k: v: lib.nameValuePair "TF_HTTP_${lib.toUpper k}" (builtins.toString v)) { inherit (config) address @@ -214,7 +213,6 @@ in }; run = mkOption { type = types.package; - readOnly = true; default = let inherit (config) @@ -296,7 +294,6 @@ in }; run = mkOption { type = types.package; - readOnly = true; default = let inherit (config) @@ -370,7 +367,6 @@ in }; run = mkOption { type = types.package; - readOnly = true; default = let inherit (config) @@ -517,7 +513,6 @@ in }; run = mkOption { type = types.package; - readOnly = true; default = let inherit (config) @@ -606,7 +601,6 @@ in }; run = mkOption { type = types.package; - readOnly = true; default = tfApply { inherit (config) httpBackend; directory = "tf-netbox-cluster-type"; @@ -684,7 +678,6 @@ in }; run = mkOption { type = types.package; - readOnly = true; default = tfApply { inherit (config) httpBackend; directory = "tf-netbox-cluster"; @@ -728,7 +721,6 @@ in }; run = mkOption { type = types.package; - readOnly = true; default = let inherit (config) @@ -771,7 +763,6 @@ in }; run = mkOption { type = types.package; - readOnly = true; default = tfApply { inherit (config) httpBackend; directory = "tf-netbox-get-ip";