Chore(complete_machines): simplify by using inventoryStore

This commit is contained in:
Johannes Kirschbauer
2025-06-10 19:09:48 +02:00
parent 7d3b5ecec9
commit a98b2fb60c
2 changed files with 3 additions and 13 deletions

View File

@@ -49,19 +49,10 @@ def complete_machines(
flake = clan_dir_result
else:
flake = "."
services_result = json.loads(
run(
nix_eval(
flags=[
f"{flake}#clanInternals.machines.x86_64-linux",
"--apply",
"builtins.attrNames",
],
),
).stdout.strip()
)
machines.extend(services_result)
inventory = InventoryStore(Flake(str(flake))).read()
machines.extend(inventory.get("machines", {}).keys())
except subprocess.CalledProcessError:
pass

View File

@@ -792,7 +792,6 @@ class Flake:
if self.flake_cache_path:
self._cache.save_to_file(self.flake_cache_path)
def precache(
self,
selectors: list[str],