20 lines
406 B
Nix
20 lines
406 B
Nix
{ config, ... }:
|
|
let
|
|
cfg = config.services.libreddit;
|
|
in
|
|
{
|
|
services.libreddit = {
|
|
enable = true;
|
|
address = "127.0.0.1";
|
|
};
|
|
|
|
services.nginx.virtualHosts."libreddit.sbruder.xyz" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations = {
|
|
"/robots.txt".return = "200 'User-agent: *\\nDisallow: /'";
|
|
"/".proxyPass = "http://${cfg.address}:${toString cfg.port}";
|
|
};
|
|
};
|
|
}
|