2023-03-05 22:51:30 +00:00
|
|
|
{ config, secret, ... }:
|
2023-02-13 19:15:10 +00:00
|
|
|
|
2023-02-12 21:13:30 +00:00
|
|
|
{
|
|
|
|
services.libreddit = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
address = "127.0.0.1";
|
|
|
|
port = 8002;
|
|
|
|
};
|
2023-02-13 19:15:10 +00:00
|
|
|
|
|
|
|
services.nginx = {
|
2023-03-05 22:51:30 +00:00
|
|
|
virtualHosts."${secret.nginx.hostnames.libreddit}" = {
|
|
|
|
forceSSL = true;
|
|
|
|
useACMEHost = "daniel.sx";
|
2023-02-13 19:15:10 +00:00
|
|
|
basicAuthFile = config.age.secrets.libreddit-auth.path;
|
|
|
|
|
|
|
|
locations."/" = {
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
proxyPass = "http://127.0.0.1:8002";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-02-12 21:13:30 +00:00
|
|
|
}
|