cli: support machines init-hardware-config --debug
This commit is contained in:
@@ -30,6 +30,7 @@ def update_hardware_config_command(args: argparse.Namespace) -> None:
|
||||
machine=machine,
|
||||
password=args.password,
|
||||
backend=HardwareConfig(args.backend),
|
||||
debug=args.debug,
|
||||
)
|
||||
|
||||
if args.target_host:
|
||||
@@ -68,6 +69,7 @@ def init_hardware_config_command(args: argparse.Namespace) -> None:
|
||||
machine=machine,
|
||||
password=args.password,
|
||||
backend=HardwareConfig(args.backend),
|
||||
debug=args.debug,
|
||||
)
|
||||
|
||||
if args.target_host:
|
||||
|
||||
@@ -66,6 +66,7 @@ class HardwareGenerateOptions:
|
||||
machine: Machine
|
||||
backend: HardwareConfig = HardwareConfig.NIXOS_FACTER
|
||||
password: str | None = None
|
||||
debug: bool = False
|
||||
|
||||
|
||||
@API.register
|
||||
@@ -115,6 +116,9 @@ def run_machine_hardware_info_init(
|
||||
backup_file = hw_file.with_suffix(".bak")
|
||||
hw_file.replace(backup_file)
|
||||
|
||||
if opts.debug:
|
||||
cmd += ["--debug"]
|
||||
|
||||
cmd += [target_host.target]
|
||||
cmd = nix_shell(
|
||||
["nixos-anywhere"],
|
||||
|
||||
Reference in New Issue
Block a user