[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:
--password <password>
--ssid <ssid>
USAGE:
ifwifi connect --interface <interface> --password <password> --ssid <ssid>
For more information try --help
I can’t really judge the pro/cons of NetworkManager on the installation device or if the proposed changes to NixOS need further tweaking. Please advice!
From the UX perspective, this should be a lot better though.
One other remaining question would be if ifwifi can connect to enterprise/school networks, seamlessly or if it would require some patching / upstream contributions.
It also looks like diacritics are messed up. Any advice? Is this a upstream fix, too?iw's fault it is.
Having network manager enabled by default, and telling users to use “nmtui” (network manager terminal user interface), that would be a good improvement and I assume it would be low effort.
What I do want in the longer term is a ifwiwi <TAB> like experience. But that depends currently on clap-rs finally implementing dynamic completion.
Once that’s in place (and I may be able to commit to implement, since I’m waiting for clap dynamic completion already for a while), we can switch and use nmtui as a fallback in complex cases.
I recently added (21.11, I think) a decent way to configure wireless networks using the (preconfigured) wpa_supplicant daemon and wpa_cli.
It’s not super user friendly but it certainly better than editing /etc/wpa_supplicant.conf and connecting to a WPA enterprise network is no more difficult than the home network equivalent.
I’d be happy if you manage to improve the UX but the replacement should not make WPA enterprise worse, IMHO.
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.
The absolute closure is probably not even near the actual impact, though. What’s again the command sequence to check the diff of a typical minimal installer in nixpkgs?