2021-09-08 18:23:21 +02:00
|
|
|
{ config, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.services.libreddit;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
services.libreddit = {
|
|
|
|
enable = true;
|
|
|
|
address = "127.0.0.1";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."libreddit.sbruder.xyz" = {
|
2023-05-06 10:54:03 +02:00
|
|
|
extraConfig = ''
|
|
|
|
allow ${config.sbruder.wireguard.home.subnet};
|
|
|
|
deny all;
|
|
|
|
'';
|
2021-09-08 18:23:21 +02:00
|
|
|
locations = {
|
|
|
|
"/robots.txt".return = "200 'User-agent: *\\nDisallow: /'";
|
|
|
|
"/".proxyPass = "http://${cfg.address}:${toString cfg.port}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|