CLI: init hw-generate command

This commit is contained in:
Johannes Kirschbauer
2024-06-15 17:35:50 +02:00
parent 119a8574e1
commit ec1eab7e14
6 changed files with 163 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ class MachineInfo:
@API.register
def show_machine(flake_url: str | Path, machine_name: str, debug: bool) -> MachineInfo:
def show_machine(flake_url: str | Path, machine_name: str) -> MachineInfo:
config = nix_config()
system = config["system"]
cmd = nix_eval(
@@ -46,7 +46,7 @@ def show_machine(flake_url: str | Path, machine_name: str, debug: bool) -> Machi
def show_command(args: argparse.Namespace) -> None:
flake_path = Path(args.flake).resolve()
machine = show_machine(flake_path, args.machine, args.debug)
machine = show_machine(flake_path, args.machine)
print(f"Name: {machine.machine_name}")
print(f"Description: {machine.machine_description or ''}")
print(f"Icon: {machine.machine_icon or ''}")