remove readOnly to facilitate user overrides

Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
Kiara Grouwstra 2025-11-20 11:42:39 +01:00
parent bb100b698e
commit 2c760d94f6
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
2 changed files with 0 additions and 17 deletions

View file

@ -94,14 +94,12 @@ in
resources = mkOption { resources = mkOption {
description = "Compute resources required by an application"; description = "Compute resources required by an application";
type = application.config.config-mapping.function-type; type = application.config.config-mapping.function-type;
readOnly = true;
default = application.config.config-mapping.apply; default = application.config.config-mapping.apply;
}; };
# TODO(@fricklerhandwerk): this needs a better name # TODO(@fricklerhandwerk): this needs a better name
config-mapping = mkOption { config-mapping = mkOption {
description = "Function type for the mapping from application configuration to required resources"; description = "Function type for the mapping from application configuration to required resources";
type = functionType; type = functionType;
readOnly = true;
default = { default = {
input-type = submodule application.config.module; input-type = submodule application.config.module;
output-type = application-resources; output-type = application-resources;
@ -138,9 +136,7 @@ in
resource-mapping = mkOption { resource-mapping = mkOption {
description = "Function type for the mapping from resources to a deployment"; description = "Function type for the mapping from resources to a deployment";
type = functionType; type = functionType;
readOnly = true;
default = { default = {
type-output = false;
input-type = submodule { input-type = submodule {
options = { options = {
deployment-name = mkOption { deployment-name = mkOption {
@ -158,9 +154,7 @@ in
config-mapping = mkOption { config-mapping = mkOption {
description = "Mapping from a configuration to a deployment"; description = "Mapping from a configuration to a deployment";
type = functionType; type = functionType;
readOnly = true;
default = { default = {
type-output = false;
input-type = submodule { input-type = submodule {
options = { options = {
deployment-name = mkOption { deployment-name = mkOption {
@ -192,7 +186,6 @@ in
deployment = mkOption { deployment = mkOption {
description = "Generate a deployment from a configuration, by applying an environment's resource policies to the applications' resource mappings"; 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; type = environment.config.config-mapping.function-type;
readOnly = true;
default = environment.config.config-mapping.apply; default = environment.config.config-mapping.apply;
}; };
}; };
@ -202,7 +195,6 @@ in
configuration = mkOption { configuration = mkOption {
description = "Configuration type declaring options to be set by operators"; description = "Configuration type declaring options to be set by operators";
type = optionType; type = optionType;
readOnly = true;
default = submodule { default = submodule {
options = { options = {
enable = lib.mkEnableOption "your Fediversity configuration"; enable = lib.mkEnableOption "your Fediversity configuration";

View file

@ -73,7 +73,6 @@ let
{ {
options = { options = {
value = mkOption { value = mkOption {
readOnly = true;
default = lib.mapAttrs' (k: v: lib.nameValuePair "TF_HTTP_${lib.toUpper k}" (builtins.toString v)) { default = lib.mapAttrs' (k: v: lib.nameValuePair "TF_HTTP_${lib.toUpper k}" (builtins.toString v)) {
inherit (config) inherit (config)
address address
@ -214,7 +213,6 @@ in
}; };
run = mkOption { run = mkOption {
type = types.package; type = types.package;
readOnly = true;
default = default =
let let
inherit (config) inherit (config)
@ -296,7 +294,6 @@ in
}; };
run = mkOption { run = mkOption {
type = types.package; type = types.package;
readOnly = true;
default = default =
let let
inherit (config) inherit (config)
@ -370,7 +367,6 @@ in
}; };
run = mkOption { run = mkOption {
type = types.package; type = types.package;
readOnly = true;
default = default =
let let
inherit (config) inherit (config)
@ -517,7 +513,6 @@ in
}; };
run = mkOption { run = mkOption {
type = types.package; type = types.package;
readOnly = true;
default = default =
let let
inherit (config) inherit (config)
@ -606,7 +601,6 @@ in
}; };
run = mkOption { run = mkOption {
type = types.package; type = types.package;
readOnly = true;
default = tfApply { default = tfApply {
inherit (config) httpBackend; inherit (config) httpBackend;
directory = "tf-netbox-cluster-type"; directory = "tf-netbox-cluster-type";
@ -684,7 +678,6 @@ in
}; };
run = mkOption { run = mkOption {
type = types.package; type = types.package;
readOnly = true;
default = tfApply { default = tfApply {
inherit (config) httpBackend; inherit (config) httpBackend;
directory = "tf-netbox-cluster"; directory = "tf-netbox-cluster";
@ -728,7 +721,6 @@ in
}; };
run = mkOption { run = mkOption {
type = types.package; type = types.package;
readOnly = true;
default = default =
let let
inherit (config) inherit (config)
@ -771,7 +763,6 @@ in
}; };
run = mkOption { run = mkOption {
type = types.package; type = types.package;
readOnly = true;
default = tfApply { default = tfApply {
inherit (config) httpBackend; inherit (config) httpBackend;
directory = "tf-netbox-get-ip"; directory = "tf-netbox-get-ip";