nix-config/containers/freshrss/default.nix

31 lines
696 B
Nix
Raw Normal View History

2024-11-26 21:43:36 -05:00
{ lib, ... }:
2024-11-10 17:54:08 -05:00
let
2024-11-26 21:43:36 -05:00
directory = "/opt/freshrss";
2024-11-10 17:54:08 -05:00
port = "8888";
in
{
2024-11-26 21:43:36 -05:00
systemd.tmpfiles.rules =
map (x: "d ${x} 0755 share share - -") (lib.lists.singleton directory);
2024-11-10 17:54:08 -05:00
virtualisation.oci-containers.containers.freshrss = {
image = "freshrss/freshrss:latest";
autoStart = true;
ports = [
"${port}:80"
];
volumes = [
2024-11-26 21:43:36 -05:00
"${directory}/data:/var/www/FreshRSS/data"
"${directory}/extensions:/var/www/FreshRSS/extensions"
2024-11-10 17:54:08 -05:00
];
environment = {
TZ = "America/Detroit";
CRON_MIN = "*/20";
};
};
2024-11-26 21:43:36 -05:00
services.caddy.virtualHosts."fresh.brownbread.net".extraConfig = ''
2024-11-10 17:54:08 -05:00
encode zstd gzip
reverse_proxy http://localhost:${port}
'';
}