summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2023-10-21 21:48:11 +0200
committerChristoph Cullmann <cullmann@kde.org>2023-10-21 21:48:11 +0200
commit8df38b9ca655e553985444b2f329e976fd664eea (patch)
treefa628c8d90e99a7363dc1e8a1370935b08242e05
parent653db3e87aa4d9a603d199a47f13978d7cfa66bb (diff)
use systemd-networkd
-rw-r--r--common.nix16
-rw-r--r--mini/configuration.nix3
-rw-r--r--neko/configuration.nix3
3 files changed, 20 insertions, 2 deletions
diff --git a/common.nix b/common.nix
index eded544..332e36f 100644
--- a/common.nix
+++ b/common.nix
@@ -64,9 +64,21 @@ in
# allow all firmware
hardware.enableAllFirmware = true;
- # use NetworkManager
+ # use systemd-networkd
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
networking.firewall.enable = true;
diff --git a/mini/configuration.nix b/mini/configuration.nix
index 36ec173..63babbb 100644
--- a/mini/configuration.nix
+++ b/mini/configuration.nix
@@ -17,6 +17,9 @@
# host name
networking.hostName = "mini";
+ # main network interface
+ systemd.network.networks."10-wan".matchConfig.Name = "eno1";
+
# amd graphics
hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ amdvlk ];
diff --git a/neko/configuration.nix b/neko/configuration.nix
index e5ae4b0..6c99146 100644
--- a/neko/configuration.nix
+++ b/neko/configuration.nix
@@ -17,6 +17,9 @@
# host name
networking.hostName = "neko";
+ # main network interface
+ systemd.network.networks."10-wan".matchConfig.Name = "enp10s0";
+
# intel graphics
hardware.opengl.extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ intel-media-driver ];