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"; + }; + }; }