about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--README.md9
-rw-r--r--hosts/by-name/server2/configuration.nix1
-rw-r--r--modules/by-name/ng/nginx/module.nix2
-rw-r--r--modules/by-name/ni/nix-sync/module.nix12
-rw-r--r--modules/by-name/re/redlib/module.nix11
5 files changed, 20 insertions, 15 deletions
diff --git a/README.md b/README.md
index 0e343d2..4f2fab5 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,12 @@
 # Vhack.eu server infrastructure
+
 This repository includes the all configurations for all services at vhack.eu and
 foss-syndicate.org.
 
 ## Contributing
+
 ### Issue reporting
+
 Issues are tracked [online](https://issues.foss-syndicate.org/issues/open) by
 [back](./pkgs/by-name/ba/back).
 
@@ -13,6 +16,6 @@ clone this repository and get a list of open issues with `git bug ls`.
 We plan to improve this issue reporting system in the future.
 
 ### Patches
-Please send your patches for now to [admin@vhack.eu](mailto://admin@vhack.eu) (with `git
-format-patch` and `git send-email`). We're hoping to set up a mailing list the future to
-improve this process.
+
+Please send your patches for now to [admin@vhack.eu](mailto://admin@vhack.eu) (with `git format-patch` and `git send-email`).
+We're planning to set up a mailing list in the future to improve this process.
diff --git a/hosts/by-name/server2/configuration.nix b/hosts/by-name/server2/configuration.nix
index 95f0ade..aee0e1a 100644
--- a/hosts/by-name/server2/configuration.nix
+++ b/hosts/by-name/server2/configuration.nix
@@ -53,6 +53,7 @@
       enable = true;
       redirects = {
         "source.foss-syndicate.org" = "https://git.foss-syndicate.org/vhack.eu/nixos-server";
+        "source.vhack.eu" = "https://source.foss-syndicate.org";
       };
     };
     nixconfig.enable = true;
diff --git a/modules/by-name/ng/nginx/module.nix b/modules/by-name/ng/nginx/module.nix
index 27b0302..1cb4e46 100644
--- a/modules/by-name/ng/nginx/module.nix
+++ b/modules/by-name/ng/nginx/module.nix
@@ -6,7 +6,7 @@
   mkRedirect = _: value: {
     forceSSL = true;
     enableACME = true;
-    locations."/".return = "301 ${value}";
+    locations."/".return = "301 ${value}$request_uri";
   };
 
   redirects = builtins.mapAttrs mkRedirect cfg.redirects;
diff --git a/modules/by-name/ni/nix-sync/module.nix b/modules/by-name/ni/nix-sync/module.nix
index 1413920..9ddd210 100644
--- a/modules/by-name/ni/nix-sync/module.nix
+++ b/modules/by-name/ni/nix-sync/module.nix
@@ -2,6 +2,7 @@
   config,
   lib,
   modulesPath,
+  nixLib,
   ...
 }: let
   cfg = config.vhack.nix-sync;
@@ -27,12 +28,15 @@
   }: {
     name = "${domain}";
     value =
-      lib.recursiveUpdate {
+      # FIXME(@bpeetz): We cannot use something like `lib.recursiveUpdate` because the
+      # `extraSettings` are instantiated from the “real” nginx type. As such the
+      # `extaSettings` would override our values here. Therefore, the direct merge. <2025-02-07>
+      extraSettings
+      // {
         forceSSL = true;
         enableACME = true;
         root = "/etc/nginx/websites/${domain}";
-      }
-      extraSettings;
+      };
   };
   virtHosts = builtins.listToAttrs (builtins.map mkVirtHost cfg.domains);
 in {
@@ -66,7 +70,7 @@ in {
             type =
               lib.types.submodule (import (modulesPath + "/services/web-servers/nginx/vhost-options.nix") {inherit config lib;});
             example = {
-              locations."/.well-known/openpgpkey/hu/".extraConfig = "default_type application/octet-stream";
+              locations."/.well-known/openpgpkey/".extraConfig = "default_type application/octet-stream";
             };
             default = {};
             description = ''
diff --git a/modules/by-name/re/redlib/module.nix b/modules/by-name/re/redlib/module.nix
index 2b20c66..eb5edba 100644
--- a/modules/by-name/re/redlib/module.nix
+++ b/modules/by-name/re/redlib/module.nix
@@ -31,14 +31,11 @@ in {
         enableACME = true;
         forceSSL = true;
       };
+    };
 
-      # TODO: Remove this at a certain point. <2024-12-19>
-      virtualHosts."libreddit.vhack.eu" = {
-        locations."/".return = "301 https://${domain}";
-
-        forceSSL = true;
-        enableACME = true;
-      };
+    # TODO(@bpeetz): Remove this at some point. <2025-02-04>
+    vhack.nginx.redirects = {
+      "libreddit.vhack.eu" = "${domain}";
     };
   };
 }