2020-10-23 21:31:49 +02:00
|
|
|
{ pkgs, lib, config, ... }:
|
2020-03-13 10:42:39 +01:00
|
|
|
let
|
|
|
|
fqdn = "rss.euer.krebsco.de";
|
2022-05-02 22:25:19 +02:00
|
|
|
ratt-path = "/var/lib/ratt/";
|
2020-03-13 10:42:39 +01:00
|
|
|
in {
|
2022-05-02 22:25:19 +02:00
|
|
|
systemd.tmpfiles.rules = ["d ${ratt-path} 0750 nginx nginx - -" ];
|
2020-03-13 10:42:39 +01:00
|
|
|
services.tt-rss = {
|
|
|
|
enable = true;
|
|
|
|
virtualHost = fqdn;
|
|
|
|
selfUrlPath = "https://${fqdn}";
|
|
|
|
};
|
2021-06-05 15:52:06 +02:00
|
|
|
|
2021-04-04 10:23:57 +02:00
|
|
|
state = [ config.services.postgresqlBackup.location ];
|
|
|
|
|
|
|
|
services.postgresqlBackup = {
|
|
|
|
enable = true;
|
|
|
|
databases = [ config.services.tt-rss.database.name ];
|
|
|
|
};
|
2022-06-06 21:17:35 +02:00
|
|
|
systemd.services.postgresqlBackup-tt_rss.serviceConfig.SupplementaryGroups = [ "download" ];
|
2021-04-04 10:23:57 +02:00
|
|
|
|
2020-03-13 10:42:39 +01:00
|
|
|
services.nginx.virtualHosts."${fqdn}" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2022-05-02 22:25:19 +02:00
|
|
|
locations."/ratt/" = {
|
|
|
|
alias = ratt-path;
|
|
|
|
extraConfig = "autoindex on;";
|
|
|
|
};
|
2020-03-13 10:42:39 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|