{ lib, pkgs, ... }: let pyWithLibs = pkgs.python312.withPackages (ps: [ ps.pytz ps.icalendar ps.requests ps.google-auth-oauthlib ps.google-api-python-client ]); in { config.systemd = { services.gdq-calendars = { wantedBy = [ "multi-user.target" ]; description = "GDQ Calendar Updater"; path = [ pyWithLibs ]; serviceConfig = { ExecStart = "${lib.getExe pyWithLibs} gdq_cal_ics_exporter.py --fatales --gcal --disable_general"; Type = "oneshot"; WorkingDirectory = "/home/thehedgehog/gdq-cals/"; User = "thehedgehog"; Group = "users"; RemainAfterExit = true; }; }; timers.gdq-calendars = { wantedBy = [ "timers.target" ]; timerConfig = { OnCalendar = "*-*-* 00/2:00:00"; Unit = "gdq-calendars.service"; }; }; }; }