Use systemd-networkd

This commit is contained in:
Natsu Kagami 2023-03-31 10:56:24 +02:00
parent ef5a5f2b97
commit 7717607628
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51

View file

@ -46,8 +46,28 @@
};
};
systemd.network.enable = true;
networking.hostName = "kagamiPC"; # Define your hostname.
networking.wireless.iwd.enable = true;
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
systemd.network.networks = {
# Wired
"10-wired" = {
matchConfig.Name = "enp*";
networkConfig.DHCP = "yes";
};
# Wireless
"20-wireless" = {
matchConfig.Name = "wlan*";
networkConfig.DHCP = "yes";
};
};
# networking.useDHCP = false;
# networking.interfaces.enp38s0.useDHCP = true;
# networking.interfaces.wlan0.useDHCP = true;
# Allow qmk boards to boot
services.udev.packages = with pkgs; [ qmk-udev-rules ];
@ -55,13 +75,6 @@
# Set your time zone.
time.timeZone = "Europe/Zurich";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.enp38s0.useDHCP = true;
networking.interfaces.wlan0.useDHCP = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";