From 1ed98184ee1b96f61f04d926e1b794378eaccfc2 Mon Sep 17 00:00:00 2001 From: winston Date: Wed, 5 Jul 2023 22:56:38 +0200 Subject: [PATCH] feat(libreddit): init --- config/services/default.nix | 1 + config/services/libreddit.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 config/services/libreddit.nix diff --git a/config/services/default.nix b/config/services/default.nix index dc8e831..3048d4e 100644 --- a/config/services/default.nix +++ b/config/services/default.nix @@ -4,6 +4,7 @@ ./containers.nix ./gitea.nix ./invidious.nix + ./libreddit.nix ./nginx.nix ./postgres.nix ]; diff --git a/config/services/libreddit.nix b/config/services/libreddit.nix new file mode 100644 index 0000000..ba43ad5 --- /dev/null +++ b/config/services/libreddit.nix @@ -0,0 +1,22 @@ +{ + config, + pkgs, + ... +}: { + services.libreddit = { + enable = true; + package = pkgs.unstable.libreddit; + address = "127.0.0.1"; + port = 12380; + }; + + services.nginx.virtualHosts."lr.winston.sh" = { + forceSSL = true; + enableACME = false; + useACMEHost = "winston.sh"; + + locations."/" = with config.services.libreddit; { + proxyPass = "http://${address}:${toString port}"; + }; + }; +}