My Nix Configuration

[marvin] add gdq-cals service

pyrox.dev 3deee70d 9b9d4213

verified
Changed files
+39
systems
x86_64-linux
marvin
+1
systems/x86_64-linux/marvin/default.nix
···
./services/avahi.nix
./services/bots.nix
./services/deemix.nix
+
./services/gdq-cals.nix
./services/git.nix
./services/golink.nix
./services/grafana.nix
+38
systems/x86_64-linux/marvin/services/gdq-cals.nix
···
+
{
+
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 --id 56 --fatales --gcal";
+
Type = "oneshot";
+
WorkingDirectory = "/home/thehedgehog/gdq-cals/";
+
User = "thehedgehog";
+
Group = "users";
+
RemainAfterExit = true;
+
};
+
};
+
timers.gdq-calendars = {
+
wantedBy = [ "timers.target" ];
+
timerConfig = {
+
OnCalendar = "*-*-* */2:00:00";
+
Unit = "gdq-calendars.service";
+
};
+
};
+
};
+
}