From 097d566da1b3fe4092d8daa38034cf9b4c64556f Mon Sep 17 00:00:00 2001 From: Soispha Date: Fri, 18 Aug 2023 14:19:12 +0200 Subject: Fix(system/services/libreddit): Actually proxy services via nginx --- system/services/libreddit/default.nix | 20 ++++++++++++++++++-- 1 file 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; + }; + }; } -- cgit 1.4.1