forked from Fediversity/Fediversity
account for 285
This commit is contained in:
parent
8135d3e1b8
commit
a34ebc8a34
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ locals {
|
||||||
garage = var.garage
|
garage = var.garage
|
||||||
} : name => merge(inst, {
|
} : name => merge(inst, {
|
||||||
# enable if any user applications are enabled
|
# enable if any user applications are enabled
|
||||||
enable = anytrue([for _, app in local.application_configs: app.enable])
|
enable = anytrue([for _, app in local.application_configs: try(app.enable, false)])
|
||||||
}) }
|
}) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ resource "terraform_data" "nixos" {
|
||||||
for_each = {for name, inst in merge(
|
for_each = {for name, inst in merge(
|
||||||
local.peripherals,
|
local.peripherals,
|
||||||
local.application_configs,
|
local.application_configs,
|
||||||
) : name => inst if inst.enable}
|
) : name => inst if try(inst.enable, false)}
|
||||||
|
|
||||||
# trigger rebuild/deploy if (FIXME?) any potentially used config/code changed,
|
# trigger rebuild/deploy if (FIXME?) any potentially used config/code changed,
|
||||||
# preventing these (20+s, build being bottleneck) when nothing changed.
|
# preventing these (20+s, build being bottleneck) when nothing changed.
|
||||||
|
|
|
@ -113,7 +113,7 @@ class DeploymentStatus(ConfigurationForm):
|
||||||
} | {
|
} | {
|
||||||
# pass in form info to our deployment
|
# pass in form info to our deployment
|
||||||
# FIXME: ensure sensitive info is protected
|
# 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)
|
logger.info("env: %s", env)
|
||||||
cwd = f"{settings.repo_dir}/launch"
|
cwd = f"{settings.repo_dir}/launch"
|
||||||
|
|
Loading…
Add table
Reference in a new issue