summary refs log tree commit diff stats
path: root/modules/by-name/re/redlib
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 14:09:14 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 14:11:04 +0100
commit441565e417f41aaeaddf8686fe8ab396073954a3 (patch)
tree451be479e4efd524906702472e7f2f1af17b75d3 /modules/by-name/re/redlib
parentrefactor(system/services/libreddit): Migrate to `by-name` (diff)
downloadnixos-server-441565e417f41aaeaddf8686fe8ab396073954a3.tar.gz
nixos-server-441565e417f41aaeaddf8686fe8ab396073954a3.zip
fix(modules/redlib): Change subdomain to `redlib` migrate-by-name
The old `libreddit` subdomain still has redirection to avoid this
being a breaking change.  But keeping the old subdomain is rather weird
considering their new name.
Diffstat (limited to 'modules/by-name/re/redlib')
-rw-r--r--modules/by-name/re/redlib/module.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/by-name/re/redlib/module.nix b/modules/by-name/re/redlib/module.nix
index 393a8b9..2b20c66 100644
--- a/modules/by-name/re/redlib/module.nix
+++ b/modules/by-name/re/redlib/module.nix
@@ -4,7 +4,7 @@
   lib,
   ...
 }: let
-  domain = "libreddit.vhack.eu";
+  domain = "redlib.vhack.eu";
 
   cfg = config.vhack.redlib;
 in {
@@ -28,8 +28,16 @@ in {
       virtualHosts.${domain} = {
         locations."/".proxyPass = "http://127.0.0.1:${toString config.services.redlib.port}";
 
-        enableACME = lib.mkDefault true;
-        forceSSL = lib.mkDefault true;
+        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;
       };
     };
   };