account for 285
Some checks failed
/ check-pre-commit (pull_request) Failing after 11s
/ check-peertube (pull_request) Successful in 18s
/ check-panel (pull_request) Successful in 1m20s
/ check-deployment-basic (pull_request) Successful in 11m36s
/ check-launch (pull_request) Successful in 56s

This commit is contained in:
Kiara Grouwstra 2025-05-09 15:16:08 +02:00
parent 1019ac15b0
commit 90cda83039
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
2 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ locals {
hostname = inst
cfg = {
# enable if any user applications are enabled
enable = anytrue([for _, app in local.application_configs: app.cfg.enable])
enable = anytrue([for _, app in local.application_configs: try(app.cfg.enable, false)])
}
}
}
@ -46,7 +46,7 @@ resource "terraform_data" "nixos" {
for_each = {for name, inst in merge(
local.peripherals,
local.application_configs,
) : name => inst if inst.cfg.enable}
) : name => inst if try(inst.cfg.enable, false)}
# trigger rebuild/deploy if (FIXME?) any potentially used config/code changed,
# preventing these (20+s, build being bottleneck) when nothing changed.

View file

@ -113,7 +113,7 @@ class DeploymentStatus(ConfigurationForm):
} | {
# pass in form info to our deployment
# FIXME: ensure sensitive info is protected
f"TF_VAR_{k}": v if isinstance(v, str) else json.dumps(v) for k, v in config.json().items()
f"TF_VAR_{k}": v if isinstance(v, str) else json.dumps(v) for k, v in json.loads(config.model_dump_json()).items()
}
logger.info("env: %s", env)
cwd = f"{settings.repo_dir}/launch"