I have NixOS 19.09 from the official Hydra image running on a Raspberry Pi 3 B+ with Kernel 4.19 (latest kernel 5.4 is not booting, and I’m not sure where the regression is). I have connman configured with wpa_supplicant as a backend, and this works to connect to a wireless network, but only once logged in. I would like to have the device connect to wifi automatically without needing to log in locally. For example, it should aggressively connect to wifi so that I can then access it via SSH. Testing on an x86 installation of NixOS with connman, it does indeed connect to the network prior to login, but I’m not sure what the difference is.
I’d also be open to using network manager instead of connman, but when I had network manager configured on the Pi (just by
networking.wireless.enable = true; in my config), the wpa_supplicant systemctl service was crashed on login, but then would work fine after a restart. So another alternative could be to either figure out why the service was crashing, or configure it to restart on failure.
In summary- what is the the best way to configure my Raspberry Pi to reliably and aggressively connect to wifi?