about summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-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
3 files changed, 13 insertions, 12 deletions
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}";
     };
   };
 }