summary refs log tree commit diff stats
path: root/system/services/libreddit/default.nix
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-10-14 15:28:05 +0200
committersils <sils@sils.li>2023-10-14 15:28:05 +0200
commit04e4866a17853d583c943b52ec2b9c5e7518e4ae (patch)
treebd079002dbebd4fffc533596c3f4e5a99a6b3a56 /system/services/libreddit/default.nix
parentFix(system/services/etebase): Add proxy parameters (diff)
parentfix(system/services/mastodon): Correctly avoid string casts (diff)
downloadnixos-server-04e4866a17853d583c943b52ec2b9c5e7518e4ae.tar.gz
nixos-server-04e4866a17853d583c943b52ec2b9c5e7518e4ae.zip
Merge branch 'main' into etebase
Diffstat (limited to '')
-rw-r--r--system/services/libreddit/default.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/system/services/libreddit/default.nix b/system/services/libreddit/default.nix
new file mode 100644
index 0000000..e4ab893
--- /dev/null
+++ b/system/services/libreddit/default.nix
@@ -0,0 +1,23 @@
+{
+  config,
+  lib,
+  ...
+}: let
+  domain = "libreddit.vhack.eu";
+in {
+  services.libreddit = {
+    enable = true;
+    address = "127.0.0.1";
+    openFirewall = false;
+  };
+
+  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;
+    };
+  };
+}