refactor: replace eval_nix/build_nix with machine.select()
- Remove nix(), eval_nix(), and build_nix() methods from Machine class - Add select() method that handles machine-specific attribute prefixes - Update all usages to use machine.select() directly - Handle Path conversion and tmp_store logic at call sites - This simplifies the Machine API and prepares for deployment.json removal
This commit is contained in:
@@ -4,7 +4,7 @@ from clan_lib.machines.machines import Machine
|
||||
|
||||
def create_backup(machine: Machine, provider: str | None = None) -> None:
|
||||
machine.info(f"creating backup for {machine.name}")
|
||||
backup_scripts = machine.eval_nix("config.clan.core.backups")
|
||||
backup_scripts = machine.select("config.clan.core.backups")
|
||||
host = machine.target_host()
|
||||
if provider is None:
|
||||
if not backup_scripts["providers"]:
|
||||
|
||||
Reference in New Issue
Block a user