summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorAlan Pearce2024-05-23 06:46:45 +0200
committerAlan Pearce2024-05-23 06:46:45 +0200
commitfb5b86f8a067f69b7db2298ab0fd4848750540e1 (patch)
tree1c992289017b2755cdd87406f186999a0c7942ba /system
parent417a1ce6481adfc713d8d0d6ad03e211a3d0eb22 (diff)
downloadnixfiles-fb5b86f8a067f69b7db2298ab0fd4848750540e1.tar.lz
nixfiles-fb5b86f8a067f69b7db2298ab0fd4848750540e1.tar.zst
nixfiles-fb5b86f8a067f69b7db2298ab0fd4848750540e1.zip
servers: set up tailscale
Diffstat (limited to 'system')
-rw-r--r--system/linde.nix9
-rwxr-xr-xsystem/nanopi.nix14
2 files changed, 14 insertions, 9 deletions
diff --git a/system/linde.nix b/system/linde.nix
index 67859334..371211ce 100644
--- a/system/linde.nix
+++ b/system/linde.nix
@@ -223,6 +223,9 @@ in
   services.resolved.enable = false;
   systemd.network = {
     enable = true;
+    wait-online = {
+      extraArgs = [ "--interface" netif ];
+    };
     networks.${netif} =
       {
         name = netif;
@@ -245,7 +248,11 @@ in
         }];
       };
   };
-  services.tailscale.enable = true;
+
+  services.tailscale = {
+    enable = true;
+    extraUpFlags = [ "--accept-routes" ];
+  };
 
   services.journald.extraConfig = ''
     MaxRetentionSec=1 month
diff --git a/system/nanopi.nix b/system/nanopi.nix
index 7e88effa..4da31b20 100755
--- a/system/nanopi.nix
+++ b/system/nanopi.nix
@@ -10,8 +10,6 @@ in
 {
   imports = [
     ./nanopi-hardware.nix
-    <nixos-hardware/friendlyarm/nanopi-r5s>
-    <agenix/modules/age.nix>
   ];
 
   age.secrets = {
@@ -188,7 +186,11 @@ in
   };
   services.resolved.enable = false;
 
-  services.tailscale.enable = true;
+  services.tailscale = {
+    enable = true;
+    extraUpFlags = [ "--advertise-routes=10.0.0.0/20,fd12:d04f:65d:42::/56" ];
+  };
+
 
   programs.command-not-found.enable = false;
 
@@ -206,7 +208,7 @@ in
   systemd.network = {
     enable = true;
     wait-online = {
-      ignoredInterfaces = [ "wan0" "wlan0" "wwan0" ];
+      extraArgs = [ "--interface" "bridge0" ];
     };
     links = {
       "10-name-lan1" = {
@@ -257,7 +259,6 @@ in
         bridge = [ "bridge0" ];
         linkConfig = {
           MACAddress = "82:E0:06:9C:8E:7C";
-          RequiredForOnline = "no";
         };
         networkConfig.LinkLocalAddressing = "no";
       };
@@ -290,7 +291,6 @@ in
       };
       "50-wwan0" = {
         matchConfig.Name = "wwan0";
-        linkConfig.RequiredForOnline = false;
         networkConfig = {
           DHCP = "yes";
           IPv6AcceptRA = true;
@@ -323,7 +323,6 @@ in
       };
       "50-wan" = {
         matchConfig.Name = "wan0";
-        linkConfig.RequiredForOnline = "no";
         networkConfig = {
           DHCP = "yes";
           IPv6AcceptRA = true;
@@ -368,7 +367,6 @@ in
       };
       "60-wlan" = {
         matchConfig.MACAddress = "9c:53:22:33:bf:e9";
-        linkConfig.RequiredForOnline = "no";
         networkConfig = {
           DHCP = "yes";
           IPForward = "yes";