refactor: remove deployment.json and use direct selectors
- Remove deployment.json file generation from outputs.nix - Add throw for deprecated deployment.file usage with upgrade instructions - Remove vars data from deployment.data - Update Machine class to use direct select() calls instead of deployment property - Update all deployment property accesses to use direct selectors - Add precaching for frequently accessed values in update.py: - Module paths for facts and vars - Deployment settings (requireExplicitUpdate, nixosMobileWorkaround) - Services and generators data - Secret upload locations - This removes unnecessary JSON serialization and makes the code more composable
This commit is contained in:
@@ -184,7 +184,12 @@ def deploy_machine(
|
||||
|
||||
# retry nixos-rebuild switch if the first attempt failed
|
||||
if ret.returncode != 0:
|
||||
is_mobile = machine.deployment.get("nixosMobileWorkaround", False)
|
||||
try:
|
||||
is_mobile = machine.select(
|
||||
"config.system.clan.deployment.nixosMobileWorkaround"
|
||||
)
|
||||
except Exception:
|
||||
is_mobile = False
|
||||
# if the machine is mobile, we retry to deploy with the mobile workaround method
|
||||
if is_mobile:
|
||||
machine.info(
|
||||
|
||||
Reference in New Issue
Block a user