diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-20 14:09:14 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-20 14:11:04 +0100 |
commit | 441565e417f41aaeaddf8686fe8ab396073954a3 (patch) | |
tree | 451be479e4efd524906702472e7f2f1af17b75d3 /modules/by-name/re | |
parent | refactor(system/services/libreddit): Migrate to `by-name` (diff) | |
download | nixos-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 '')
-rw-r--r-- | modules/by-name/re/redlib/module.nix | 14 |
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; }; }; }; |