{ pkgs, ... }: { users.users."feeds" = { isSystemUser = true; group = "feeds"; }; users.groups."feeds" = {}; systemd.tmpfiles.rules = [ "d /data/feeds 0775 root users - -" "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 = '' ${pkgs.feeds-dir}/bin/feeds-dir /data/feeds ''; }; }; systemd.timers."feeds" = { wantedBy = [ "timers.target" ]; timerConfig = { OnCalendar = "hourly"; RandomizedDelaySec = "1h"; }; requires = [ "network-online.target" ]; after = [ "network-online.target" ]; }; }