summary refs log tree commit diff
path: root/machines/fourmi/devices.nix
diff options
context:
space:
mode:
Diffstat (limited to 'machines/fourmi/devices.nix')
-rw-r--r--machines/fourmi/devices.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/machines/fourmi/devices.nix b/machines/fourmi/devices.nix
index c8d2e72..56d243f 100644
--- a/machines/fourmi/devices.nix
+++ b/machines/fourmi/devices.nix
@@ -51,18 +51,28 @@
   };
 
   networking = {
-    # todo: configure properly
     firewall.enable = lib.mkForce false;
-
-    useDHCP = true;
     wireless = {
       enable = true;
       interfaces = [ "wlan0" ];
       secretsFile = config.age.secrets.wireless-secrets.path;
-      networks = {
-        # yea this is my home network :3
-        # (my boyfriends brother picked the name)
-        "Das asoziale Netzwerk".pskRaw = "ext:psk_home";
+      networks."Das asoziale Netzwerk".pskRaw = "ext:psk_home";
+    };
+  };
+
+  systemd.network = {
+    networks = {
+      "10-wired" = {
+        name = "end0";
+        DHCP = "yes";
+        dhcpV4Config.RouteMetric = 100;
+        networkConfig.RequiredForOnline = "no";
+      };
+      "20-wireless" = {
+        name = "wlan0";
+        DHCP = "yes";
+        dhcpV4Config.RouteMetric = 600;
+        networkConfig.RequiredForOnline = "no";
       };
     };
   };