From 4aa63021ff0af07959c9612d9c69d4e263d0bf6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 3 Dec 2024 20:18:34 +0100 Subject: [PATCH] flash: drop wifi option This feature is broken and will be replaced by templates machines eventually. --- docs/site/getting-started/installer.md | 6 ------ pkgs/clan-cli/clan_cli/flash/flash.py | 12 ------------ pkgs/clan-cli/clan_cli/flash/flash_cmd.py | 13 +------------ pkgs/webview-ui/app/src/routes/flash/view.tsx | 1 - 4 files changed, 1 insertion(+), 31 deletions(-) diff --git a/docs/site/getting-started/installer.md b/docs/site/getting-started/installer.md index f3470aa24..d4a75d952 100644 --- a/docs/site/getting-started/installer.md +++ b/docs/site/getting-started/installer.md @@ -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. - - **Wifi Option**: - To add wifi credentials into the installer image append the option: - ``` - --wifi - ``` - - **List Keymaps**: You can get a list of all keymaps with the following command: ``` diff --git a/pkgs/clan-cli/clan_cli/flash/flash.py b/pkgs/clan-cli/clan_cli/flash/flash.py index 127a8f568..686cee62d 100644 --- a/pkgs/clan-cli/clan_cli/flash/flash.py +++ b/pkgs/clan-cli/clan_cli/flash/flash.py @@ -23,17 +23,11 @@ from .list import list_possible_keymaps, list_possible_languages log = logging.getLogger(__name__) -@dataclass -class WifiConfig: - ssid: str - - @dataclass class SystemConfig: language: str | None = field(default=None) keymap: str | None = field(default=None) ssh_keys_path: list[str] | None = field(default=None) - wifi_settings: list[WifiConfig] | None = field(default=None) @dataclass @@ -65,12 +59,6 @@ def flash_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 not in list_possible_languages(): msg = ( diff --git a/pkgs/clan-cli/clan_cli/flash/flash_cmd.py b/pkgs/clan-cli/clan_cli/flash/flash_cmd.py index c636d7b5a..f661ac3dd 100644 --- a/pkgs/clan-cli/clan_cli/flash/flash_cmd.py +++ b/pkgs/clan-cli/clan_cli/flash/flash_cmd.py @@ -10,7 +10,7 @@ from clan_cli.clan_uri import FlakeId from clan_cli.completions import add_dynamic_completer, complete_machines 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__) @@ -69,15 +69,11 @@ def flash_command(args: argparse.Namespace) -> None: language=args.language, keymap=args.keymap, ssh_keys_path=args.ssh_pubkey, - wifi_settings=None, ), write_efi_boot_entries=args.write_efi_boot_entries, 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) if opts.confirm and not opts.dry_run: 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. """ ) - parser.add_argument( - "--wifi", - type=str, - action="append", - help="wifi ssid to connect to", - default=[], - ) parser.add_argument( "--mode", type=str, diff --git a/pkgs/webview-ui/app/src/routes/flash/view.tsx b/pkgs/webview-ui/app/src/routes/flash/view.tsx index 46cfc2e54..608fbc7a6 100644 --- a/pkgs/webview-ui/app/src/routes/flash/view.tsx +++ b/pkgs/webview-ui/app/src/routes/flash/view.tsx @@ -157,7 +157,6 @@ export const Flash = () => { language: values.language, keymap: values.keymap, ssh_keys_path: values.sshKeys.map((file) => file.name), - wifi_settings: values.wifi, }, dry_run: false, write_efi_boot_entries: false,