use systemd-networkd

This commit is contained in:
Christoph Cullmann 2023-10-21 21:48:11 +02:00
parent 653db3e87a
commit 8df38b9ca6
3 changed files with 20 additions and 2 deletions

View file

@ -64,9 +64,21 @@ in
# allow all firmware # allow all firmware
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
# use NetworkManager # use systemd-networkd
networking.useDHCP = false; networking.useDHCP = false;
networking.networkmanager.enable = true; systemd.network = {
enable = true;
networks."10-wan" = {
networkConfig = {
# start a DHCP Client for IPv4 Addressing/Routing
DHCP = "ipv4";
# accept Router Advertisements for Stateless IPv6 Autoconfiguraton (SLAAC)
IPv6AcceptRA = true;
};
# make routing on this interface a dependency for network-online.target
linkConfig.RequiredForOnline = "routable";
};
};
# ensure firewall is up, allow ssh and http in # ensure firewall is up, allow ssh and http in
networking.firewall.enable = true; networking.firewall.enable = true;

View file

@ -17,6 +17,9 @@
# host name # host name
networking.hostName = "mini"; networking.hostName = "mini";
# main network interface
systemd.network.networks."10-wan".matchConfig.Name = "eno1";
# amd graphics # amd graphics
hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ]; hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ amdvlk ]; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ amdvlk ];

View file

@ -17,6 +17,9 @@
# host name # host name
networking.hostName = "neko"; networking.hostName = "neko";
# main network interface
systemd.network.networks."10-wan".matchConfig.Name = "enp10s0";
# intel graphics # intel graphics
hardware.opengl.extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ]; hardware.opengl.extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ intel-media-driver ]; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ intel-media-driver ];