2023-06-06 22:42:21 +02:00
|
|
|
{ config, lib, ... }:
|
2022-11-02 11:30:13 +01:00
|
|
|
let
|
2023-06-06 22:42:21 +02:00
|
|
|
cfg = config.services.az-rss-bridge;
|
2024-01-01 13:14:24 +01:00
|
|
|
whitelist = builtins.toFile "whitelist.txt" "*";
|
2024-02-02 13:45:05 +01:00
|
|
|
in
|
|
|
|
{
|
2023-06-06 22:42:21 +02:00
|
|
|
options = {
|
|
|
|
services.az-rss-bridge.enable = lib.mkEnableOption "Enable RSS bridge.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
services.az-docker.enable = true;
|
2023-05-29 17:10:15 +02:00
|
|
|
|
2023-06-06 22:42:21 +02:00
|
|
|
virtualisation.oci-containers = {
|
|
|
|
backend = "docker";
|
|
|
|
containers."rss-bridge" = {
|
|
|
|
# https://hub.docker.com/r/rssbridge/rss-bridge/tags
|
2024-03-11 12:35:01 +01:00
|
|
|
image = "rssbridge/rss-bridge@sha256:298bf07e7b80bda6ce4bed08f09737b4ac0a426ef43fb3476975a91aae0aec39";
|
2023-06-06 22:42:21 +02:00
|
|
|
autoStart = true;
|
2024-01-01 13:14:24 +01:00
|
|
|
ports = [ "8082:80" ];
|
2023-06-06 22:42:21 +02:00
|
|
|
volumes = [
|
|
|
|
"${whitelist}:/app/whitelist.txt"
|
|
|
|
"/etc/localtime:/etc/localtime:ro"
|
|
|
|
];
|
2024-01-01 13:14:24 +01:00
|
|
|
extraOptions = [ "--log-opt=tag='rss-brige'" ];
|
2023-06-06 22:42:21 +02:00
|
|
|
};
|
2022-11-02 11:30:13 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|