My Nix Configuration
1{ 2 lib, 3 pkgs, 4 ... 5}: 6let 7 pyWithLibs = pkgs.python312.withPackages (ps: [ 8 ps.pytz 9 ps.icalendar 10 ps.requests 11 ps.google-auth-oauthlib 12 ps.google-api-python-client 13 ]); 14in 15{ 16 config.systemd = { 17 services.gdq-calendars = { 18 wantedBy = [ "multi-user.target" ]; 19 description = "GDQ Calendar Updater"; 20 path = [ pyWithLibs ]; 21 serviceConfig = { 22 ExecStart = "${lib.getExe pyWithLibs} gdq_cal_ics_exporter.py --fatales --gcal --disable_general"; 23 Type = "oneshot"; 24 WorkingDirectory = "/home/thehedgehog/gdq-cals/"; 25 User = "thehedgehog"; 26 Group = "users"; 27 RemainAfterExit = true; 28 }; 29 }; 30 timers.gdq-calendars = { 31 wantedBy = [ "timers.target" ]; 32 timerConfig = { 33 OnCalendar = "*-*-* 00/2:00:00"; 34 Unit = "gdq-calendars.service"; 35 }; 36 }; 37 }; 38}