diff options
-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; + }; + }; } |