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,8 +16,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
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;
|
||||||
|
@ -48,12 +47,22 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"GUK-huis".psk = "@PSK_GUKhuis@";
|
"GUK-huis".psk = "@PSK_GUKhuis@";
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
interfaces = {
|
systemd.network = {
|
||||||
"${wireless-interface}".useDHCP = true;
|
enable = true;
|
||||||
} // lib.mapAttrs (name: attrs: { useDHCP = true; } // attrs) wired-interfaces;
|
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