From 594e672df4ef4f85536240e2234daaca92760671 Mon Sep 17 00:00:00 2001 From: quitte Date: Sun, 4 Feb 2024 13:07:41 +0100 Subject: [PATCH] decisions: add timer for tex to db --- modules/decisions.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/decisions.nix b/modules/decisions.nix index a8e56ee..5eade91 100644 --- a/modules/decisions.nix +++ b/modules/decisions.nix @@ -30,4 +30,23 @@ in ''; }; }; + + systemd.timers."decisions-to-db" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "01:11:00"; + Unit = "decisions-to-db.service"; + }; + }; + + systemd.services."decisions-to-db" = { + script = '' + set -eu + ${pkgs.docker}/bin/docker exec decicions python tex_to_db.py + ''; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + }; }