zaphyra's git: nixfiles

zaphyra and void's nixfiles

commit 7f716b4567a73c779d56b51b4743013100bd9709
parent ce0a666733b217e772b0310640bba9551b4fcdda
Author: Katja (zaphyra) <git@ctu.cx>
Date: Thu, 29 May 2025 23:54:32 +0200

nix-fmt foo
4 files changed, 49 insertions(+), 40 deletions(-)
diff --git a/config/nixos/modules/presets/katja/mautrixBridges/signal.nix b/config/nixos/modules/presets/katja/mautrixBridges/signal.nix
@@ -50,7 +50,7 @@ in
         relay.enabled = false;
         backfill.enabled = true;
 
-        #      double_puppet.secrets."${homeserver.domain}" = "as_token:$MAUTRIX_DOUBLE_PUPPET_SHARED_SECRET";
+        # double_puppet.secrets."${homeserver.domain}" = "as_token:$MAUTRIX_DOUBLE_PUPPET_SHARED_SECRET";
 
         appservice = {
           id = "signal";
diff --git a/config/nixos/modules/presets/katja/router/pppd.nix b/config/nixos/modules/presets/katja/router/pppd.nix
@@ -20,7 +20,7 @@ in
   };
 
   config = lib.mkIf cfg {
-    sops.secrets."environments/pppd" = {};
+    sops.secrets."environments/pppd" = { };
 
     services.pppd = {
       enable = true;

@@ -77,7 +77,8 @@ in
           enableStrictShellChecks = true;
         };
 
-      in {
+      in
+      {
         EnvironmentFile = config.sops.secrets."environments/pppd".path;
         ExecStartPre = [
           # "+" marks script to be executed without priviledge restrictions
diff --git a/config/nixos/modules/presets/katja/router/systemd-networkd.nix b/config/nixos/modules/presets/katja/router/systemd-networkd.nix
@@ -20,7 +20,7 @@ in
 
   config = lib.mkIf cfg {
     sops.secrets.wireguardPrivKey = {
-      mode  = "640";
+      mode = "640";
       owner = "root";
       group = "systemd-network";
     };

@@ -59,16 +59,18 @@ in
 
         wireguardConfig = {
           PrivateKeyFile = config.sops.secrets.wireguardPrivKey.path;
-          ListenPort     = 51820;
-          FirewallMark   = 51820;
+          ListenPort = 51820;
+          FirewallMark = 51820;
         };
 
-        wireguardPeers = [{
-          Endpoint   = "novus.infra.zaphyra.eu:51820";
-          PublicKey  = "J+kRRNU65JGc0yk04v6P3tFwHSQOIfq8EkfD2gFupg4=";
-          AllowedIPs = [ "::/0" ];
-          PersistentKeepalive = 10;
-        }];
+        wireguardPeers = [
+          {
+            Endpoint = "novus.infra.zaphyra.eu:51820";
+            PublicKey = "J+kRRNU65JGc0yk04v6P3tFwHSQOIfq8EkfD2gFupg4=";
+            AllowedIPs = [ "::/0" ];
+            PersistentKeepalive = 10;
+          }
+        ];
       };
 
       networks = {

@@ -77,7 +79,7 @@ in
 
           address = [ "192.168.1.2/24" ];
 
-          linkConfig.RequiredForOnline      = false;
+          linkConfig.RequiredForOnline = false;
           networkConfig.LinkLocalAddressing = false;
         };
 

@@ -99,8 +101,8 @@ in
 
           networkConfig = {
             KeepConfiguration = true;
-            IPv6AcceptRA      = true;
-            DHCP              = "ipv6";
+            IPv6AcceptRA = true;
+            DHCP = "ipv6";
           };
 
           ipv6AcceptRAConfig = {

@@ -108,9 +110,9 @@ in
           };
 
           dhcpV6Config = {
-            WithoutRA            = "solicit";
+            WithoutRA = "solicit";
             PrefixDelegationHint = "::/56";
-            IAID   = 0;
+            IAID = 0;
             UseDNS = false;
           };
         };

@@ -119,15 +121,17 @@ in
           matchConfig.Name = "wg-novus";
 
           linkConfig.RequiredForOnline = false;
-          routes = [{
+          routes = [
+            {
               Destination = "::/0";
-              Table       = "1234";
-          }];
+              Table = "1234";
+            }
+          ];
         };
 
         "20-brlan" = {
           matchConfig = {
-            Name   = "brlan";
+            Name = "brlan";
             Driver = "bridge";
           };
 

@@ -138,14 +142,14 @@ in
 
           routingPolicyRules = [
             {
-              From     = "2a03:4000:4d:5e:acab::/112";
-              Table    = 254;
+              From = "2a03:4000:4d:5e:acab::/112";
+              Table = 254;
               Priority = 1900;
               SuppressPrefixLength = 0;
             }
             {
-              From     = "2a03:4000:4d:5e:acab::/112";
-              Table    = 1234;
+              From = "2a03:4000:4d:5e:acab::/112";
+              Table = 1234;
               Priority = 2000;
             }
           ];

@@ -153,30 +157,32 @@ in
           networkConfig = {
             ConfigureWithoutCarrier = true;
 
-            DHCPPrefixDelegation  = true;
+            DHCPPrefixDelegation = true;
             IPv6PrivacyExtensions = false;
-            IPv6AcceptRA          = false;
-            IPv6SendRA            = true;
+            IPv6AcceptRA = false;
+            IPv6SendRA = true;
 
             DHCPServer = true;
-            DNS        = hostConfig.networking.ip4Address;
+            DNS = hostConfig.networking.ip4Address;
           };
 
           dhcpPrefixDelegationConfig = {
             UplinkInterface = "ppp-dtagdsl";
-            Announce        = true;
-            SubnetId        = 0;
-            Token           = "::1";
+            Announce = true;
+            SubnetId = 0;
+            Token = "::1";
           };
 
           ipv6SendRAConfig = {
             EmitDNS = true;
-            DNS     = "_link_local";
+            DNS = "_link_local";
           };
 
-          ipv6PREF64Prefixes = [{
-            Prefix = "64:ff9b::/96";
-          }];
+          ipv6PREF64Prefixes = [
+            {
+              Prefix = "64:ff9b::/96";
+            }
+          ];
 
           dhcpServerConfig = {
             PersistLeases = true;
diff --git a/hosts/novus/default.nix b/hosts/novus/default.nix
@@ -129,10 +129,12 @@
         };
 
         networks."20-wg0" = {
-          name   = "wg0";
-          routes = [{
-            Destination = "2a03:4000:4d:5e:acab::/112";
-          }];
+          name = "wg0";
+          routes = [
+            {
+              Destination = "2a03:4000:4d:5e:acab::/112";
+            }
+          ];
           linkConfig.RequiredForOnline = false;
         };
       };