pass in flakeid to vm_state_dir

This commit is contained in:
Jörg Thalheim
2024-10-02 10:59:41 +02:00
committed by Mic92
parent 07e6d1e57c
commit 8101996c16
7 changed files with 16 additions and 18 deletions

View File

@@ -14,7 +14,7 @@ class FactStore(FactStoreBase):
def __init__(self, machine: Machine) -> None:
self.machine = machine
self.works_remotely = False
self.dir = vm_state_dir(str(machine.flake), machine.name) / "facts"
self.dir = vm_state_dir(machine.flake, machine.name) / "facts"
log.debug(f"FactStore initialized with dir {self.dir}")
def exists(self, service: str, name: str) -> bool:

View File

@@ -10,7 +10,7 @@ from . import SecretStoreBase
class SecretStore(SecretStoreBase):
def __init__(self, machine: Machine) -> None:
self.machine = machine
self.dir = vm_state_dir(str(machine.flake), machine.name) / "secrets"
self.dir = vm_state_dir(machine.flake, machine.name) / "secrets"
self.dir.mkdir(parents=True, exist_ok=True)
def set(