clan-cli: Acutally test SecretStore for age and password-store.

This commit is contained in:
Qubasa
2024-06-24 21:41:16 +02:00
parent 690a1fe64c
commit 70ca824e88
6 changed files with 105 additions and 60 deletions

View File

@@ -47,7 +47,9 @@ class SecretStore(SecretStoreBase):
return path
def get(self, service: str, name: str) -> bytes:
raise NotImplementedError()
return decrypt_secret(
self.machine.flake_dir, f"{self.machine.name}-{name}"
).encode("utf-8")
def exists(self, service: str, name: str) -> bool:
return has_secret(