Use systemd.network.networks instead of networking.interfaces
This fixes the 90 second timeout for unconnected interfaces
This commit is contained in:
parent
e04ddb39b4
commit
cd1d80a3ff
1 changed files with 45 additions and 36 deletions
|
@ -16,44 +16,53 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = with config.chvp.base.network.mobile; lib.mkIf enable {
|
config = with config.chvp.base.network.mobile; lib.mkIf enable {
|
||||||
networking = {
|
networking.wireless = {
|
||||||
wireless = {
|
enable = true;
|
||||||
enable = true;
|
interfaces = [ wireless-interface ];
|
||||||
interfaces = [ wireless-interface ];
|
environmentFile = config.age.secrets."passwords/networks.age".path;
|
||||||
environmentFile = config.age.secrets."passwords/networks.age".path;
|
networks = {
|
||||||
networks = {
|
"Public Universal Friend".psk = "@PSK_PUF@";
|
||||||
"Public Universal Friend".psk = "@PSK_PUF@";
|
AndroidAP.psk = "@PSK_AndroidAP@";
|
||||||
AndroidAP.psk = "@PSK_AndroidAP@";
|
draadloosnw.psk = "@PSK_draadloosnw@";
|
||||||
draadloosnw.psk = "@PSK_draadloosnw@";
|
werknet.psk = "@PSK_werknet@";
|
||||||
werknet.psk = "@PSK_werknet@";
|
Secorima.psk = "@PSK_Secorima@";
|
||||||
Secorima.psk = "@PSK_Secorima@";
|
"Zeus WPI" = {
|
||||||
"Zeus WPI" = {
|
psk = "@PSK_Zeus@";
|
||||||
psk = "@PSK_Zeus@";
|
hidden = true;
|
||||||
hidden = true;
|
|
||||||
};
|
|
||||||
"Zeus Event 5G".psk = "@PSK_Zeus@";
|
|
||||||
eduroam = {
|
|
||||||
authProtocols = [ "WPA-EAP" ];
|
|
||||||
auth = ''
|
|
||||||
eap=PEAP
|
|
||||||
identity="@EDUROAM_USER@"
|
|
||||||
password="@EDUROAM_PASS@"
|
|
||||||
'';
|
|
||||||
extraConfig = ''
|
|
||||||
phase1="peaplabel=0"
|
|
||||||
phase2="auth=MSCHAPV2"
|
|
||||||
group=CCMP TKIP
|
|
||||||
ca_cert="${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
||||||
altsubject_match="DNS:radius.ugent.be"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
"GUK-huis".psk = "@PSK_GUKhuis@";
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
"Zeus Event 5G".psk = "@PSK_Zeus@";
|
||||||
|
eduroam = {
|
||||||
|
authProtocols = [ "WPA-EAP" ];
|
||||||
|
auth = ''
|
||||||
|
eap=PEAP
|
||||||
|
identity="@EDUROAM_USER@"
|
||||||
|
password="@EDUROAM_PASS@"
|
||||||
|
'';
|
||||||
|
extraConfig = ''
|
||||||
|
phase1="peaplabel=0"
|
||||||
|
phase2="auth=MSCHAPV2"
|
||||||
|
group=CCMP TKIP
|
||||||
|
ca_cert="${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||||
|
altsubject_match="DNS:radius.ugent.be"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
"GUK-huis".psk = "@PSK_GUKhuis@";
|
||||||
};
|
};
|
||||||
interfaces = {
|
};
|
||||||
"${wireless-interface}".useDHCP = true;
|
systemd.network = {
|
||||||
} // lib.mapAttrs (name: attrs: { useDHCP = true; } // attrs) wired-interfaces;
|
enable = true;
|
||||||
|
networks = {
|
||||||
|
"${wireless-interface}" = {
|
||||||
|
enable = true;
|
||||||
|
DHCP = "yes";
|
||||||
|
matchConfig = { Name = wireless-interface; };
|
||||||
|
};
|
||||||
|
} // lib.mapAttrs (name: attrs: {
|
||||||
|
enable = true;
|
||||||
|
DHCP = "yes";
|
||||||
|
matchConfig = { Name = name; };
|
||||||
|
} // attrs) wired-interfaces;
|
||||||
|
wait-online.anyInterface = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
age.secrets."passwords/networks.age" = {
|
age.secrets."passwords/networks.age" = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue