summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/deployment/rss/rss.euer.krebsco.de.nix
blob: e204050b4fb07695b61313d1bc8a74fc8163479f (plain)
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
26
27
28
29
30
31
32
33
34
{ pkgs, lib, config, ... }:
let
  fqdn = "rss.euer.krebsco.de";
  ratt-path = "/var/lib/ratt/";
in {
  systemd.tmpfiles.rules = ["d ${ratt-path} 0750 nginx nginx - -" ];
  services.tt-rss = {
    enable = true;
    virtualHost = fqdn;
    selfUrlPath = "https://${fqdn}";
  };

  state = [ config.services.postgresqlBackup.location ];

  services.postgresqlBackup = {
    enable = true;
    databases = [ config.services.tt-rss.database.name ];
  };
  systemd.services.tt-rss.serviceConfig =  {
    Restart = lib.mkForce "always";
  };

  systemd.services.postgresqlBackup-tt_rss.serviceConfig.SupplementaryGroups = [ "download" ];

  services.nginx.virtualHosts."${fqdn}" = {
    enableACME = true;
    forceSSL = true;
    locations."/ratt/" = {
      alias = ratt-path;
      extraConfig = "autoindex on;";
    };
  };
}