[nixos@nixos:~]$ nmcli d
DEVICE TYPE STATE CONNECTION
wlp2s0 wifi disconnected --
lo loopback unmanaged --
nixpkgs on master [$!+] took 2s
❯ sudo ./result/bin/ifwifi scan
* 84:c9:c6:90:8d:29 FamiliaAA 4 -58.00 Good
44:48:b9:0d:ec:97 Familia Ben\xc3\xadtez Anjel_PLUS 36 -78.00 Unreliable
[ ... ]
cc:d4:a1:4d:7c:97 SANTOS_PLUS 40 -79.00 Unreliable
nixpkgs on master [$!+] took 4s
❯ sudo ./result/bin/ifwifi connect
error: The following required arguments were not provided:
ifwifi connect --interface <interface> --password <password> --ssid <ssid>
For more information try --help
You can still do that, but since 134030 the manual and the login screen recommends systemctl start wpa_supplicant and using wpa_cli.
Starting wpa_supplicant manually requires knowing the interface, in some cases the driver name and sacrificing a tty, which it’s pretty clearly worse. Generating the config with wpa_passphrase is simple enough but, again, no WPA2 enterprise nor WPA3 support.
The simplest way forward would be to replace wpa_cli with a less low-level tool, but I’m not aware of any.
Yeah, for some reasons wpa_cli will spam you with the daemon log, but you can just ignore it. The commands are pretty low level but you can also scan networks, check the connection status.
nmtui does not support WPA2 Enterprise nor WPA3?
No no, I was talking about wpa_passphrase and the other tool. nmtui is probably the best UX but requires bringing NetworkManager into the minimal installer. I’m not sure why it was never done, I suppose the closure size is quite large.