aboutsummaryrefslogtreecommitdiff
path: root/modules/containers/freshrss/default.nix
blob: 7cbe9448491533bfef2a30323a14dd048efca9a8 (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
{ ... }:
let
  directory = "/opt/freshrss";
  port = "8888";
in
{
  systemd.tmpfiles.rules = builtins.map (x: "d ${x} 0755 share share - -") [ directory ];

  virtualisation.oci-containers.containers.freshrss = {
    image = "freshrss/freshrss:latest";
    autoStart = true;
    ports = [ "${port}:80" ];
    volumes = [
      "${directory}/data:/var/www/FreshRSS/data"
      "${directory}/extensions:/var/www/FreshRSS/extensions"
    ];
    environment = {
      TZ = "America/Detroit";
      CRON_MIN = "*/20";
    };
  };

  services.caddy.virtualHosts."fresh.brownbread.net".extraConfig = ''
    encode zstd gzip
    reverse_proxy http://localhost:${port}
  '';
}