I also tried this solution, but building my new configuration resulted in the following error:
building Nix...
building the system configuration...
error:
… while calling the 'head' builtin
at /nix/store/bfg7xzgvbhxhs7vnl7lynaxmjhmvc4j0-nixos/nixos/lib/attrsets.nix:820:11:
819| || pred here (elemAt values 1) (head values) then
820| head values
| ^
821| else
… while evaluating the attribute 'value'
at /nix/store/bfg7xzgvbhxhs7vnl7lynaxmjhmvc4j0-nixos/nixos/lib/modules.nix:807:9:
806| in warnDeprecation opt //
807| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
808| inherit (res.defsFinal') highestPrio;
(stack trace truncated; use '--show-trace' to show the full trace)
error: getting status of '/etc/nixos/eduroam.patch': No such file or directory
Neither of these attempts worked, does somebody know how a possible solution to make eduroam wpa2 to work or tell me if I did something wrong?
I used the official eduroam installation script to set it up on my NixOS laptop, you can download it here. I think to run it, I also needed the dconf python package, but that might also depend on the desktop environment (I use KDE). In my NixOS config, I’m pretty sure that I’ve only set the option:
Fyi, if this doesn’t work, despite eduroam’s claim to allowing you just to log in from any educational facility, often the details of the specific institution’s implementation differs in subtle ways usually ignored by GUI connection managers, but can trip up at least wpa_supplicant.
Specifically, I recall the phase2 differing between at least three institutions.
It’s been a while since I last fought it, but if that doesn’t work, try setting it up with something like networkmanager, and then inspecting the actual network settings. Or maybe iwd or wpa_cli supports scanning for that nowadays.
Or maybe I reverse engineered their “installer”, it’s a bash script that expects you to use networkmanager if I’m not mistaken.
I should also advise you to get your hands on a copy of your institution’s public key. Normally it’s downloaded and kept on first authentication, but this does not happen automatically with the cli connection managers.
This error smells like you’re not telling us something, by the way. Where is nix getting that file path from?
It’s far worse now, it’s an auto-generated Python script with dead code everywhere.
Anyway, in my case I got the connection barely working by looking at the manual settings my university published on the Internet, but I get very frequent disconnections that taste like authentication misconfiguration.
Part of the rationale for my “minimal” eduroam configuration was partly due to the disconnections. Trying to copy the network configuration did not fare well.
Configure only the essentials, and then let the network subsystem do the rest. In my case I ended up always having to explicitly type in the username and password but it always worked fine.