Move rss-bridge into options

This commit is contained in:
Andreas Zweili 2023-06-06 22:42:21 +02:00
parent 0f1a5bf89a
commit 494919d623
3 changed files with 27 additions and 19 deletions

View File

@ -43,6 +43,7 @@
./services/restic-client-server-mysql
./services/restic-client-server-postgres
./services/restic-server
./rss-bridge
./services/syslog
./services/telegram-notifications
./services/tlp

View File

@ -1,26 +1,33 @@
{ ... }:
{ config, lib, ... }:
let
cfg = config.services.az-rss-bridge;
whitelist = builtins.toFile "whitelist.txt" ''*'';
in
{
services.az-docker.enable = true;
options = {
services.az-rss-bridge.enable = lib.mkEnableOption "Enable RSS bridge.";
};
virtualisation.oci-containers = {
backend = "docker";
containers."rss-bridge" = {
# https://hub.docker.com/r/rssbridge/rss-bridge/tags
image = "rssbridge/rss-bridge@sha256:7b8be6079488926287d7ba4043d24b679218ccb7bf87b4e47ff0571ec500c345";
autoStart = true;
ports = [
"8082:80"
];
volumes = [
"${whitelist}:/app/whitelist.txt"
"/etc/localtime:/etc/localtime:ro"
];
extraOptions = [
"--log-opt=tag='rss-brige'"
];
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:7b8be6079488926287d7ba4043d24b679218ccb7bf87b4e47ff0571ec500c345";
autoStart = true;
ports = [
"8082:80"
];
volumes = [
"${whitelist}:/app/whitelist.txt"
"/etc/localtime:/etc/localtime:ro"
];
extraOptions = [
"--log-opt=tag='rss-brige'"
];
};
};
};
}

View File

@ -8,7 +8,6 @@ in
ip = "10.7.89.115";
inherit hostname;
})
"${inputs.self}/modules/rss-bridge"
(import "${inputs.self}/modules/ttrss-postgres" { inherit domain; })
];
services = {
@ -23,5 +22,6 @@ in
tag = "tt-rss";
time = "23:00";
};
az-rss-bridge.enable = true;
};
}