services.rsshub: fix

This commit is contained in:
陈浩南 2024-08-29 11:41:25 +08:00
parent 5bc06f6c00
commit b12d519fd5

View File

@ -13,7 +13,9 @@ inputs:
inherit (builtins) map listToAttrs toString;
in mkIf rsshub.enable
{
systemd.services.rsshub =
systemd =
{
services.rsshub =
{
description = "rsshub";
after = [ "network.target" "redis-rsshub.service" ];
@ -30,6 +32,8 @@ inputs:
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
};
};
tmpfiles.rules = [ "d /var/cache/rsshub 0700 rsshub rsshub" ];
};
sops =
{
templates."rsshub/env".content =
@ -46,6 +50,8 @@ inputs:
YOUTUBE_CLIENT_ID='${placeholder."rsshub/youtube-client-id"}'
YOUTUBE_CLIENT_SECRET='${placeholder."rsshub/youtube-client-secret"}'
YOUTUBE_REFRESH_TOKEN='${placeholder."rsshub/youtube-refresh-token"}'
XDG_CONFIG_HOME='/var/cache/rsshub/chromium'
XDG_CACHE_HOME='/var/cache/rsshub/chromium'
'';
secrets = (listToAttrs (map (secret: { name = "rsshub/${secret}"; value = {}; })
[