zaphyra's git: nixfiles

zaphyra's nixfiles

commit 74869bc300fb2c739e20ef2461b1a1c8184fe319
parent 949a0b67d40701f524d3091b67462dfd1264d465
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Sun, 26 Oct 2025 13:07:00 +0100

hosts/novus: move `fedi.ctu.cx` to `pratorum`
7 files changed, 85 insertions(+), 81 deletions(-)
diff --git a/config/nixos/modules/websites/fedi.ctu.cx.nix b/config/nixos/modules/websites/fedi.ctu.cx.nix
@@ -170,7 +170,7 @@ in
             };
 
             "/assets/".extraConfig = ''
-              alias ${config.tgc.services.gotosocial.package}/share/web/assets/;
+              alias ${config.tgc.services.gotosocial.package}/share/gotosocial/web/assets/;
               autoindex off;
               expires max;
               add_header Cache-Control "public, immutable";
diff --git a/config/nixos/modules/websites/fedi.home.ctu.cx.nix b/config/nixos/modules/websites/fedi.home.ctu.cx.nix
@@ -49,7 +49,7 @@ in
       services.resticBackup.paths = {
         gotosocial = {
           enable = true;
-          package = pkgs.tgc.gotosocial-unstable;
+          #package = pkgs.tgc.gotosocial-unstable;
           user = config.tgc.services.gotosocial.user;
           passwordFile = config.sops.secrets."resticPasswords/gotosocial".path;
           sqliteDatabases = [

@@ -71,6 +71,7 @@ in
     tgc.services.gotosocial = {
       enable = true;
       group = config.services.nginx.group;
+      package = pkgs.tgc.gotosocial-unstable;
       settings = {
         protocol = "https";
 

@@ -82,9 +83,6 @@ in
           "172.17.0.0/24"
         ];
 
-        db-type = lib.mkDefault "sqlite";
-        db-address = lib.mkDefault "${config.tgc.services.gotosocial.stateDir}/db.sqlite";
-
         storage-backend = lib.mkDefault "local";
         storage-local-base-path = "${config.tgc.services.gotosocial.stateDir}/storage";
 

@@ -117,76 +115,75 @@ in
       appendHttpConfig = ''
         proxy_cache_path /var/cache/nginx keys_zone=gotosocial_ap_public_responses:10m inactive=1w;
       '';
-      virtualHosts =
-        {
-          "${config.tgc.services.gotosocial.settings.host}" = {
-            useACMEHost = lib.mkDefault "${config.networking.fqdn}";
-            forceSSL = lib.mkDefault true;
-            kTLS = lib.mkDefault true;
-            locations = {
-              "/" = {
-                proxyPass = "http://${toString config.tgc.services.gotosocial.settings.bind-address}:${toString config.tgc.services.gotosocial.settings.port}";
-                proxyWebsockets = true;
-              };
-
-              "~ /.well-known/(webfinger|host-meta)$" = {
-                proxyPass = "http://${toString config.tgc.services.gotosocial.settings.bind-address}:${toString config.tgc.services.gotosocial.settings.port}";
-                extraConfig = ''
-                  proxy_cache gotosocial_ap_public_responses;
-                  proxy_cache_background_update on;
-                  proxy_cache_key $scheme://$host$uri$is_args$query_string;
-                  proxy_cache_valid 200 10m;
-                  proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504 http_429;
-                  proxy_cache_lock on;
-                  add_header X-Cache-Status $upstream_cache_status;
-                '';
-              };
+      virtualHosts = {
+        "${config.tgc.services.gotosocial.settings.host}" = {
+          useACMEHost = lib.mkDefault "${config.networking.fqdn}";
+          forceSSL = lib.mkDefault true;
+          kTLS = lib.mkDefault true;
+          locations = {
+            "/" = {
+              proxyPass = "http://${toString config.tgc.services.gotosocial.settings.bind-address}:${toString config.tgc.services.gotosocial.settings.port}";
+              proxyWebsockets = true;
+            };
 
-              "~ ^\/users\/(?:[a-z0-9_\.]+)\/main-key$" = {
-                proxyPass = "http://${toString config.tgc.services.gotosocial.settings.bind-address}:${toString config.tgc.services.gotosocial.settings.port}";
-                extraConfig = ''
-                  proxy_cache gotosocial_ap_public_responses;
-                  proxy_cache_background_update on;
-                  proxy_cache_key $scheme://$host$uri;
-                  proxy_cache_valid 200 604800s;
-                  proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504 http_429;
-                  proxy_cache_lock on;
-
-                  add_header X-Cache-Status $upstream_cache_status;
-                '';
-              };
+            "~ /.well-known/(webfinger|host-meta)$" = {
+              proxyPass = "http://${toString config.tgc.services.gotosocial.settings.bind-address}:${toString config.tgc.services.gotosocial.settings.port}";
+              extraConfig = ''
+                proxy_cache gotosocial_ap_public_responses;
+                proxy_cache_background_update on;
+                proxy_cache_key $scheme://$host$uri$is_args$query_string;
+                proxy_cache_valid 200 10m;
+                proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504 http_429;
+                proxy_cache_lock on;
+                add_header X-Cache-Status $upstream_cache_status;
+              '';
+            };
 
-              "/assets/".extraConfig = ''
-                alias ${config.tgc.services.gotosocial.package}/share/web/assets/;
-                autoindex off;
-                expires max;
-                add_header Cache-Control "public, immutable";
+            "~ ^\/users\/(?:[a-z0-9_\.]+)\/main-key$" = {
+              proxyPass = "http://${toString config.tgc.services.gotosocial.settings.bind-address}:${toString config.tgc.services.gotosocial.settings.port}";
+              extraConfig = ''
+                proxy_cache gotosocial_ap_public_responses;
+                proxy_cache_background_update on;
+                proxy_cache_key $scheme://$host$uri;
+                proxy_cache_valid 200 604800s;
+                proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504 http_429;
+                proxy_cache_lock on;
+
+                add_header X-Cache-Status $upstream_cache_status;
               '';
             };
+
+            "/assets/".extraConfig = ''
+              alias ${config.tgc.services.gotosocial.package}/share/web/assets/;
+              autoindex off;
+              expires max;
+              add_header Cache-Control "public, immutable";
+            '';
           };
-        }
-        // (
-          if
-            (
-              config.tgc.services.gotosocial.settings.account-domain
-              != config.tgc.services.gotosocial.settings.host
-            )
-          then
-            {
-              "${config.tgc.services.gotosocial.settings.account-domain}" = {
-                locations = {
-                  "= /.well-known/host-meta".extraConfig =
-                    "return 301 https://${config.tgc.services.gotosocial.settings.host}$request_uri;";
-                  "= /.well-known/webfinger".extraConfig =
-                    "return 301 https://${config.tgc.services.gotosocial.settings.host}$request_uri;";
-                  "= /.well-known/nodeinfo".extraConfig =
-                    "return 301 https://${config.tgc.services.gotosocial.settings.host}$request_uri;";
-                };
+        };
+      }
+      // (
+        if
+          (
+            config.tgc.services.gotosocial.settings.account-domain
+            != config.tgc.services.gotosocial.settings.host
+          )
+        then
+          {
+            "${config.tgc.services.gotosocial.settings.account-domain}" = {
+              locations = {
+                "= /.well-known/host-meta".extraConfig =
+                  "return 301 https://${config.tgc.services.gotosocial.settings.host}$request_uri;";
+                "= /.well-known/webfinger".extraConfig =
+                  "return 301 https://${config.tgc.services.gotosocial.settings.host}$request_uri;";
+                "= /.well-known/nodeinfo".extraConfig =
+                  "return 301 https://${config.tgc.services.gotosocial.settings.host}$request_uri;";
               };
-            }
-          else
-            { }
-        );
+            };
+          }
+        else
+          { }
+      );
     };
   };
 
diff --git a/config/nixos/modules/websites/restic.novus.infra.zaphyra.eu.nix b/config/nixos/modules/websites/restic.pratorum.infra.zaphyra.eu.nix
diff --git a/hosts/novus/default.nix b/hosts/novus/default.nix
@@ -95,13 +95,8 @@
         };
 
         websites = {
-          "restic.novus.infra.zaphyra.eu".enable = true;
           "flauschehorn.zaphyra.eu".enable = true;
           "ip.zaphyra.eu".enable = true;
-
-          #old fedi-instance
-          "ctu.cx".enable = true;
-          "fedi.ctu.cx".enable = true;
         };
 
         users.zaphyra.enable = true;
diff --git a/hosts/polaris/default.nix b/hosts/polaris/default.nix
@@ -3,7 +3,7 @@
   system = "x86_64-linux";
   nixpkgsStable = true;
 
-  domain = "home.infra.zaphyra.eu";
+  domain = "infra.zaphyra.eu";
 
   sshPubKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA2bluHGMcdKEremjLq3aUEeJlWHlGSjL8nuAhkeEl1f";
 

@@ -18,8 +18,8 @@
     ip4PrefixLength = 8;
 
     ip6IsPrivate = false;
-    ip6Address = "2a03:4000:4d:5e:acab::1";
-    ip6PrefixLength = 112;
+    ip6Address = "2a03:4000:4d:5e:acab::2";
+    ip6PrefixLength = 128;
 
     hasDN42 = true;
     dn42Address = "fd6b:6174:6a61::5";

@@ -81,7 +81,7 @@
           zaphyra = {
             enable = true;
             router.enable = true;
-            smarthome.enable = true;
+            # smarthome.enable = true;
           };
         };
 
diff --git a/hosts/pratorum/default.nix b/hosts/pratorum/default.nix
@@ -37,6 +37,7 @@
 
       imports = [
         ./dn42.nix
+        ./floractl.nix
       ];
 
       boot.initrd.systemd.emergencyAccess = true;

@@ -169,8 +170,13 @@
         };
 
         websites = {
+          # "restic.pratorum.infra.zaphyra.eu".enable = true;
           "music.zaphyra.dn42".enable = true;
           "continuwuity-migration.zaphyra.eu".enable = true;
+
+          #old fedi-instance
+          "ctu.cx".enable = true;
+          "fedi.ctu.cx".enable = true;
         };
 
         users.zaphyra.enable = true;
diff --git a/secrets/pratorum.yaml b/secrets/pratorum.yaml
@@ -2,6 +2,12 @@ acmeTSIGKey: ENC[AES256_GCM,data:qfY0SbY0rusU+vCr7oiHTLHjICZBU1lYlBn7D2BLY5IWJbg
 syncthing:
     cert: ENC[AES256_GCM,data:fOMcvmhu9QkF99SD95kzZEveMiwAR/R8GDffsqW0Nmp2gW2ThYG7pVi9TVnFwkPoncxEor5+vPDtDlTHuMHt3wAHvCZ7gftorvABrzkyhVEqNRLDln3JlgZ/YpAzjutXRCiuliE85AgOMB8WsniBSPQihCDIe2MolbYo8JlLJXL/5D6p9CGQqmRzlbmw2Unxzk7Xjw9Cm7RjaszK4SuB+loPdI3suVrCtfKQxQkCzDwQUdBnfeCyesYoPXJBBMDAtForu9i65LOXibDmvKj2rH5/zoUvvV5NO5wncMLED3X5Xyasz5ALJwxmOC+SR9u80emqoW6oN++V/IK8vG5/iiOSdTc7VYHjOgwzgfk47RMS9180cfP3c75Dap4uztdI3bMVYCt5UUkd4bqKI1IEOXG+TL2Ouorcti14G1JlIS17L+KLwnKsc4Ggend0fC7TQz/zAMkG95FmR30YK9G4dzsj7IKdQQeXBpMl7n/WY5byG3qAWqJbOK3EX8glZUHQjUlGCQSokk8CRGB9AhS66wisRNR7BQoYR2c9KjUD/xwVUCIeRDt+6ysUiFOhnhoGAgsnFTZtiuk+JOGhLx5LFWCV/l1kDzwtPa0lSUGeuoMb6rrnEc5HmFzmgKNAD+safXkuEt5ZoqjlCcI2XlnwLsLqQucroky6XhUomFqjesZj4cu2Y3OlkXB7sYQUGIO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StSkJMBQVA==,type:str]
+environments:
+    gotosocial: ""
 zigbee2mqttSecrets: ENC[AES256_GCM,data:XuRVNV4gVr5FLgqGRXxgyaMAVJIt38adDOzJnY0GWaN52Lb9/E7Sx/TWB41cEO9D4/+LRlf0VbE2B0zehYjQGw1dHlf4rvS5OH8PefKdqBv6w+G0BKRXGh8daERsU8v2r+Vjw7kWtyiADzKP2NRJrVLnJiITwq8kmHHsrYNcs+/492Z1/ElDTe3B32Hq7ATHaP+G7xbfgxMuxIcf9z1EFl39krpgQaw/5eWq7WT7QZIHKD7tZqSpgAUxSDBSNjE+M3wq8PmaqecvO1h/+UtEq5MzxnzfpF0yopJa9cch5SwQqT6XHrxzbM2DldZctuGGmcTJrWpcqHkT4mcO4MfwlanJ/YaT70H25ukJEAHKG/rU86QCk5pIUwGSH15GSxi8ze83QFmJhskzMAoJuDJ6h1AoS9bRn5wY,iv:kZqhnTlwMhIvXg4deiC1D73Y+gspZwdu08yoyeAEngk=,tag:GuzryBSDNke+5jXOuDtwDw==,type:str]
 dn42:
     wgPrivateKey: ENC[AES256_GCM,data:CjFgiBZieQdWPyDPl6gcz3xarWR5GTYJ9Ruee7/9pQLlypm+RWRys/3WOFo=,iv:uC7A58MS0zvwKMc74x0xSTIAJS7GbvoJN5N9KfXFVyw=,tag:y9sNo65Qk1TxqN0ReKDCAQ==,type:str]

@@ -16,8 +22,8 @@ sops:
             TndyejhxbVZDTVdaYWRXT1htMVVsOTgKWAOJekArzYzoJF/JcPTSWrhQnvQrl9bU
             A7H0mCdklZZ66jiUo4iKLwocBn7h9VJ4p3lBdRxyqXuN6dicdQfafg==
             -----END AGE ENCRYPTED FILE-----
-    lastmodified: "2025-09-22T17:42:12Z"
-    mac: ENC[AES256_GCM,data:oN5xWdhk4JTJ9x6YjnIfuPlc/h59XKacSHZqPJPd6Q4b7M4zZqZ+SlZ+4E2UAI5w8eoqXHCJAGCSEOzYZ9MBW+zVu9oiWTWWDWBn0D6KRct+NAN+hDisGWBS1dL2uTNchdQfBsFp81Yc9HvLjQ8R40vqp2i/y03JjZChYexpl0I=,iv:Zj2Uj6cra7GXZzeJYj2z7Nc2KArPuf2/dUvYwCAZuO8=,tag:tb2a+0JqDz4u+i2/bAVXAA==,type:str]
+    lastmodified: "2025-10-26T09:31:13Z"
+    mac: ENC[AES256_GCM,data:KVjp50vGTtvOQOYRXbxmcEcbenJuWA4mqrsy0OVKS7MPtvmFBcQk+9joJG7yQrhMUxqndtM31md8JjvPRTOIfRVCwrsYAqwM4ZHOIeZp5fNFX7/QJvAMsc8kb1zQN2PB2KdxLIsqOoOuF6P2cjxTRMLdqjR2aMnzH/Cv++9iAus=,iv:KBzCCu5fSpz+T6rOCTgviGss1xvqrJLQapLwoo0brZA=,tag:ql35SeUmEHOjbMBdDWCTFA==,type:str]
     pgp:
         - created_at: "2025-09-21T19:21:14Z"
           enc: |-

@@ -31,4 +37,4 @@ sops:
             -----END PGP MESSAGE-----
           fp: BFE6386C8D66BCD4DAE14FC895F0FE7CD7E6A022
     unencrypted_suffix: _unencrypted
-    version: 3.10.2
+    version: 3.11.0