courge: gdm: enable to support screen locking
[julm/julm-nix.git] / hosts / aubergine / networking / ethernet.nix
index c6c55a0e2248e6b5e65fdd1b3eb25c32eee69860..68045c35b219d1bddf6cf526cf31725cf9143207 100644 (file)
@@ -1,5 +1,6 @@
 { lib, ... }:
 with (import ./names-and-numbers.nix);
+with (import ./names-and-numbers.nix.clear);
 {
   networking.interfaces = {
     ${eth1Iface} = {
@@ -16,7 +17,6 @@ with (import ./names-and-numbers.nix);
     };
   };
   networking.networkmanager = {
-    #enable = true;
     unmanaged = [
       eth1Iface
       eth2Iface
@@ -33,6 +33,10 @@ with (import ./names-and-numbers.nix);
         oifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } jump output-lan
         oifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } log level warn prefix "output-lan: " counter drop
       }
+      chain forward-to-lan { }
+      chain forward {
+        iifname { "enp2s0", "enp3s0", "enp4s0", "wlp5s0" } oifname  { "enp2s0", "enp3s0", "enp4s0", "wlp5s0" } goto forward-to-lan
+      }
     }
   '';
 
@@ -55,6 +59,12 @@ with (import ./names-and-numbers.nix);
         option domain-name-servers ${eth1IPv4}.1;
         option routers ${eth1IPv4}.1;
         option subnet-mask 255.255.255.0;
+        group {
+          host patate1 {
+            hardware ethernet ${patateMAC};
+            fixed-address ${eth1IPv4}.3;
+          }
+        }
       }
 
       subnet ${eth2IPv4}.0 netmask 255.255.255.0 {
@@ -63,6 +73,12 @@ with (import ./names-and-numbers.nix);
         option domain-name-servers ${eth2IPv4}.1;
         option routers ${eth2IPv4}.1;
         option subnet-mask 255.255.255.0;
+        group {
+          host patate2 {
+            hardware ethernet ${patateMAC};
+            fixed-address ${eth2IPv4}.3;
+          }
+        }
       }
 
       subnet ${eth3IPv4}.0 netmask 255.255.255.0 {
@@ -71,6 +87,12 @@ with (import ./names-and-numbers.nix);
         option domain-name-servers ${eth3IPv4}.1;
         option routers ${eth3IPv4}.1;
         option subnet-mask 255.255.255.0;
+        group {
+          host patate3 {
+            hardware ethernet ${patateMAC};
+            fixed-address ${eth3IPv4}.3;
+          }
+        }
       }
     '';
   };