clan-lib: Move nix_options from Machine class to Flake class

This commit is contained in:
Qubasa
2025-06-23 13:46:10 +02:00
parent d3d2cb8723
commit d14a5d34fd
11 changed files with 57 additions and 54 deletions

View File

@@ -2,7 +2,7 @@ import importlib
import json
import logging
import re
from dataclasses import dataclass, field
from dataclasses import dataclass
from functools import cached_property
from pathlib import Path
from typing import TYPE_CHECKING, Any, Literal
@@ -30,8 +30,6 @@ class Machine:
name: str
flake: Flake
nix_options: list[str] = field(default_factory=list)
def get_inv_machine(self) -> "InventoryMachine":
return get_machine(self.flake, self.name)
@@ -177,8 +175,7 @@ class Machine:
system = config["system"]
return self.flake.select(
f'clanInternals.machines."{system}"."{self.name}".{attr}',
nix_options=nix_options,
f'clanInternals.machines."{system}"."{self.name}".{attr}'
)
def eval_nix(