flash: drop wifi option
This feature is broken and will be replaced by templates machines eventually.
This commit is contained in:
@@ -68,12 +68,6 @@ sudo umount /dev/sdb1
|
|||||||
```
|
```
|
||||||
If you do not have an ssh key yet, you can generate one with `ssh-keygen -t ed25519` command.
|
If you do not have an ssh key yet, you can generate one with `ssh-keygen -t ed25519` command.
|
||||||
|
|
||||||
- **Wifi Option**:
|
|
||||||
To add wifi credentials into the installer image append the option:
|
|
||||||
```
|
|
||||||
--wifi <ssid> <password>
|
|
||||||
```
|
|
||||||
|
|
||||||
- **List Keymaps**:
|
- **List Keymaps**:
|
||||||
You can get a list of all keymaps with the following command:
|
You can get a list of all keymaps with the following command:
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -23,17 +23,11 @@ from .list import list_possible_keymaps, list_possible_languages
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class WifiConfig:
|
|
||||||
ssid: str
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class SystemConfig:
|
class SystemConfig:
|
||||||
language: str | None = field(default=None)
|
language: str | None = field(default=None)
|
||||||
keymap: str | None = field(default=None)
|
keymap: str | None = field(default=None)
|
||||||
ssh_keys_path: list[str] | None = field(default=None)
|
ssh_keys_path: list[str] | None = field(default=None)
|
||||||
wifi_settings: list[WifiConfig] | None = field(default=None)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@@ -65,12 +59,6 @@ def flash_machine(
|
|||||||
)
|
)
|
||||||
generate_facts([machine])
|
generate_facts([machine])
|
||||||
|
|
||||||
if system_config.wifi_settings:
|
|
||||||
wifi_settings: dict[str, dict[str, str]] = {}
|
|
||||||
for wifi in system_config.wifi_settings:
|
|
||||||
wifi_settings[wifi.ssid] = {}
|
|
||||||
system_config_nix["clan"] = {"iwd": {"networks": wifi_settings}}
|
|
||||||
|
|
||||||
if system_config.language:
|
if system_config.language:
|
||||||
if system_config.language not in list_possible_languages():
|
if system_config.language not in list_possible_languages():
|
||||||
msg = (
|
msg = (
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from clan_cli.clan_uri import FlakeId
|
|||||||
from clan_cli.completions import add_dynamic_completer, complete_machines
|
from clan_cli.completions import add_dynamic_completer, complete_machines
|
||||||
from clan_cli.machines.machines import Machine
|
from clan_cli.machines.machines import Machine
|
||||||
|
|
||||||
from .flash import Disk, SystemConfig, WifiConfig, flash_machine
|
from .flash import Disk, SystemConfig, flash_machine
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -69,15 +69,11 @@ def flash_command(args: argparse.Namespace) -> None:
|
|||||||
language=args.language,
|
language=args.language,
|
||||||
keymap=args.keymap,
|
keymap=args.keymap,
|
||||||
ssh_keys_path=args.ssh_pubkey,
|
ssh_keys_path=args.ssh_pubkey,
|
||||||
wifi_settings=None,
|
|
||||||
),
|
),
|
||||||
write_efi_boot_entries=args.write_efi_boot_entries,
|
write_efi_boot_entries=args.write_efi_boot_entries,
|
||||||
nix_options=args.option,
|
nix_options=args.option,
|
||||||
)
|
)
|
||||||
|
|
||||||
if args.wifi:
|
|
||||||
opts.system_config.wifi_settings = [WifiConfig(ssid=ssid) for ssid in args.wifi]
|
|
||||||
|
|
||||||
machine = Machine(opts.machine, flake=opts.flake)
|
machine = Machine(opts.machine, flake=opts.flake)
|
||||||
if opts.confirm and not opts.dry_run:
|
if opts.confirm and not opts.dry_run:
|
||||||
disk_str = ", ".join(f"{disk.name}={disk.device}" for disk in opts.disks)
|
disk_str = ", ".join(f"{disk.name}={disk.device}" for disk in opts.disks)
|
||||||
@@ -126,13 +122,6 @@ def register_flash_write_parser(parser: argparse.ArgumentParser) -> None:
|
|||||||
Mount is useful for updating an existing system without losing data.
|
Mount is useful for updating an existing system without losing data.
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
"--wifi",
|
|
||||||
type=str,
|
|
||||||
action="append",
|
|
||||||
help="wifi ssid to connect to",
|
|
||||||
default=[],
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--mode",
|
"--mode",
|
||||||
type=str,
|
type=str,
|
||||||
|
|||||||
@@ -157,7 +157,6 @@ export const Flash = () => {
|
|||||||
language: values.language,
|
language: values.language,
|
||||||
keymap: values.keymap,
|
keymap: values.keymap,
|
||||||
ssh_keys_path: values.sshKeys.map((file) => file.name),
|
ssh_keys_path: values.sshKeys.map((file) => file.name),
|
||||||
wifi_settings: values.wifi,
|
|
||||||
},
|
},
|
||||||
dry_run: false,
|
dry_run: false,
|
||||||
write_efi_boot_entries: false,
|
write_efi_boot_entries: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user