summaryrefslogtreecommitdiff
path: root/hostnix/elmo/rss.nix
blob: 421934e21e6edcb206714faadad41fe1da2e5ff6 (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
35
36
37
38
39
40
41
42
43
44
{ lib, ... }:

{
  services.miniflux = {
    enable = true;
    config = {
      BASE_URL = "http://mf.elmo.mou.fo";
      CREATE_ADMIN = 0;
      LISTEN_ADDR = "/run/miniflux/miniflux.sock";
    };
  };

  # https://github.com/NixOS/nixpkgs/issues/177284
  systemd.services.miniflux.serviceConfig.RuntimeDirectoryMode = lib.mkForce "0755";

  # TODO allocate a subdomain
  services.nginx.virtualHosts."mf.elmo.mou.fo" = {
    # TODO enableACME = true;
    # TODO forceSSL = true;
    locations."/" = {
      proxyPass = "http://unix:/run/miniflux/miniflux.sock";
    };
  };

  # TODO services.oauth2-proxy.nginx.virtualHosts = { "mf.mou.fo" = {}; };

  virtualisation.podman.enable = true;
  virtualisation.oci-containers = {
    containers = {
      rss = {
        image = "codeberg.org/danb/rss";
        ports = [ "127.0.0.1:8283:80" ];
        volumes = [ "/home/joe/rss:/app/storage" ];
        autoStart = true;
      };
    };
  };

  services.nginx.virtualHosts."rss.elmo.mou.fo" = {
    locations."/" = {
      proxyPass = "http://localhost:8283";
    };
  };
}