diff options
author | Soispha <soispha@vhack.eu> | 2023-08-18 14:19:12 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-08-18 14:19:12 +0200 |
commit | 097d566da1b3fe4092d8daa38034cf9b4c64556f (patch) | |
tree | 7e9cd71b98b5d1c55e20b58806c90d1cde82e7bd /system/services/libreddit | |
parent | Feat(system/services/libreddit): Init (diff) | |
download | nixos-server-097d566da1b3fe4092d8daa38034cf9b4c64556f.tar.gz nixos-server-097d566da1b3fe4092d8daa38034cf9b4c64556f.zip |
Fix(system/services/libreddit): Actually proxy services via nginx
Diffstat (limited to '')
-rw-r--r-- | system/services/libreddit/default.nix | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/system/services/libreddit/default.nix b/system/services/libreddit/default.nix index e52507f..581445c 100644 --- a/system/services/libreddit/default.nix +++ b/system/services/libreddit/default.nix @@ -1,7 +1,23 @@ -{...}: { +{ + config, + lib, + ... +}: let + domain = "libreddit.vhack.eu"; +in { services.libreddit = { enable = true; - address = "libreddit.vhack.eu"; + address = "127.0.0.1"; openFirewall = true; }; + + services.nginx = { + enable = true; + virtualHosts.${domain} = { + locations."/".proxyPass = "http://127.0.0.1:${toString config.services.libreddit.port}"; + + enableACME = lib.mkDefault true; + forceSSL = lib.mkDefault true; + }; + }; } |