ink: add to office profile
[julm/julm-nix.git] / hosts / aubergine / networking / ethernet.nix
index 2d42c9259c5123717dd3f06555ae6fcb844c752a..68045c35b219d1bddf6cf526cf31725cf9143207 100644 (file)
@@ -1,11 +1,7 @@
 { lib, ... }:
 with (import ./names-and-numbers.nix);
+with (import ./names-and-numbers.nix.clear);
 {
-  services.dnscrypt-proxy2.settings.listen_addresses = [
-    "${eth1IPv4}.1:53"
-    "${eth2IPv4}.1:53"
-    "${eth3IPv4}.1:53"
-  ];
   networking.interfaces = {
     ${eth1Iface} = {
       useDHCP = false;
@@ -21,7 +17,6 @@ with (import ./names-and-numbers.nix);
     };
   };
   networking.networkmanager = {
-    #enable = true;
     unmanaged = [
       eth1Iface
       eth2Iface
@@ -38,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
+      }
     }
   '';
 
@@ -60,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 {
@@ -68,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 {
@@ -76,13 +87,14 @@ 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;
+          }
+        }
       }
     '';
   };
 
-  services.openssh.listenAddresses = [
-    { addr = "${eth1IPv4}.1"; port = 22; }
-    { addr = "${eth2IPv4}.1"; port = 22; }
-    { addr = "${eth3IPv4}.1"; port = 22; }
-  ];
 }