Finally a fix DHCP+VLANs thanks to systemd-networkd
All checks were successful
Check Flake / check-flake (push) Successful in 3m31s
All checks were successful
Check Flake / check-flake (push) Successful in 3m31s
This commit is contained in:
parent
948984af2d
commit
dc02438a63
@ -58,43 +58,26 @@
|
||||
};
|
||||
swapDevices = [ ];
|
||||
|
||||
systemd.network.enable = true;
|
||||
networking = {
|
||||
dhcpcd.enable = false;
|
||||
|
||||
useNetworkd = true;
|
||||
dhcpcd.enable = true;
|
||||
vlans = {
|
||||
main = {
|
||||
id = 1;
|
||||
interface = "eth1";
|
||||
};
|
||||
iot = {
|
||||
id = 2;
|
||||
interface = "eth1";
|
||||
};
|
||||
};
|
||||
|
||||
interfaces.eth1.ipv4.addresses = [{
|
||||
address = "192.168.1.2";
|
||||
prefixLength = 21;
|
||||
}];
|
||||
interfaces.iot.ipv4.addresses = [{
|
||||
address = "192.168.9.8";
|
||||
prefixLength = 22;
|
||||
}];
|
||||
|
||||
defaultGateway = "192.168.1.1";
|
||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||
# Shouldn't be needed but it is. DHCP only works for a day or so while without these.
|
||||
# This ensures that each interface is configured with DHCP
|
||||
interfaces."main".useDHCP = true;
|
||||
interfaces."iot".useDHCP = true;
|
||||
};
|
||||
|
||||
# networking = {
|
||||
# vlans = {
|
||||
# iot = {
|
||||
# id = 2;
|
||||
# interface = "eth1";
|
||||
# };
|
||||
# };
|
||||
|
||||
# defaultGateway = {
|
||||
# interface = "eth1";
|
||||
# address = "192.168.1.1";
|
||||
# metric = 10; # always use this route as default gateway
|
||||
# };
|
||||
# };
|
||||
|
||||
powerManagement.cpuFreqGovernor = "powersave";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user