From 8ecb978605b5b336ac669ae9df22a90f6d0cc644 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Fri, 7 Feb 2025 16:41:07 -0600 Subject: [PATCH] update syncthing module --- sys/platforms/vps/srv/syncthing.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/platforms/vps/srv/syncthing.nix b/sys/platforms/vps/srv/syncthing.nix index 0d4f9e8..581df4c 100644 --- a/sys/platforms/vps/srv/syncthing.nix +++ b/sys/platforms/vps/srv/syncthing.nix @@ -21,4 +21,22 @@ with lib; { }; }; }; + + # calibre web stuff. make this better someday, this is pure duct-tape + users.groups."calybresync".members = ["syncthing" "calibre-web"]; + systemd = { + services."calybreown" = { + script = '' + chgrp -R calybresync /var/lib/calibre-web/calibre_library + chmod -R g+w /var/lib/calibre-web/calibre_library + ''; + serviceConfig.Type = "oneshot"; + }; + timers."calybreown" = { + wantedBy = [ + "timers.target" + ]; + timerConfig.OnCalendar = "*-*-* *:00/30:00"; + }; + }; }