summary refs log tree commit diff stats
path: root/system/services/libreddit/default.nix
blob: 9a7c459c642bc5505980b3512e20bedbefd88083 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  pkgs-unstable,
  config,
  lib,
  ...
}: let
  domain = "libreddit.vhack.eu";
in {
  services.libreddit = {
    enable = true;
    package = pkgs-unstable.redlib;
    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;
    };
  };
}