30 lines
817 B
Nix
30 lines
817 B
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.services.az-rss-bridge;
|
|
whitelist = builtins.toFile "whitelist.txt" "*";
|
|
in
|
|
{
|
|
options = {
|
|
services.az-rss-bridge.enable = lib.mkEnableOption "Enable RSS bridge.";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.az-docker.enable = true;
|
|
|
|
virtualisation.oci-containers = {
|
|
backend = "docker";
|
|
containers."rss-bridge" = {
|
|
# https://hub.docker.com/r/rssbridge/rss-bridge/tags
|
|
image = "rssbridge/rss-bridge@sha256:ee2061c1cc0aa1c48fb6427c078f59a8a29f47d87b5f268bca8dd5d8d4ed549e";
|
|
autoStart = true;
|
|
ports = [ "8082:80" ];
|
|
volumes = [
|
|
"${whitelist}:/app/whitelist.txt"
|
|
"/etc/localtime:/etc/localtime:ro"
|
|
];
|
|
extraOptions = [ "--log-opt=tag='rss-brige'" ];
|
|
};
|
|
};
|
|
};
|
|
}
|