2025-01-05 16:26:46 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
users.users."feeds" = {
|
|
|
|
isSystemUser = true;
|
|
|
|
group = "feeds";
|
|
|
|
};
|
|
|
|
|
|
|
|
users.groups."feeds" = {};
|
|
|
|
|
|
|
|
systemd.tmpfiles.rules = [
|
2025-01-06 18:38:16 +01:00
|
|
|
"d /data/feeds 0775 root users - -"
|
2025-01-05 16:26:46 +01:00
|
|
|
"d /var/lib/feeds - feeds feeds - -"
|
|
|
|
];
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
virtualHosts."feeds.clerie.de" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
root = "/var/lib/feeds";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services."feeds" = {
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
requires = [ "network.target" ];
|
|
|
|
after = [ "network.target" ];
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
|
|
|
WorkingDirectory = "/var/lib/feeds";
|
|
|
|
RuntimeDirectory = "feeds";
|
|
|
|
User = "feeds";
|
|
|
|
Group = "feeds";
|
|
|
|
ExecStart = ''
|
2025-01-06 18:38:16 +01:00
|
|
|
${pkgs.feeds-dir}/bin/feeds-dir /data/feeds
|
2025-01-05 16:26:46 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.timers."feeds" = {
|
|
|
|
wantedBy = [ "timers.target" ];
|
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "hourly";
|
|
|
|
RandomizedDelaySec = "1h";
|
|
|
|
};
|
|
|
|
requires = [ "network-online.target" ];
|
|
|
|
after = [ "network-online.target" ];
|
|
|
|
};
|
|
|
|
}
|