clan-vm-manager: Fix waypipe regression in nix code

This commit is contained in:
Qubasa
2024-07-23 13:20:02 +02:00
parent 4f482ed8a6
commit 31161322d6
20 changed files with 75 additions and 208 deletions

View File

@@ -8,6 +8,12 @@ from ..completions import add_dynamic_completer, complete_machines
from ..machines.machines import Machine
@dataclass
class WaypipeConfig:
enable: bool
command: list[str]
@dataclass
class VmConfig:
machine_name: str
@@ -24,6 +30,8 @@ class VmConfig:
def __post_init__(self) -> None:
if isinstance(self.flake_url, str):
self.flake_url = FlakeId(self.flake_url)
if isinstance(self.waypipe, dict):
self.waypipe = WaypipeConfig(**self.waypipe)
def inspect_vm(machine: Machine) -> VmConfig: