diff --git a/modules/periodic.nix b/modules/periodic.nix index 92060dd..2305eca 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -46,4 +46,19 @@ in { requires = [ "systemd-udev-settle.service" ]; after = [ "systemd-udev-settle.service" ]; }; + + # HACK: restart services dependent on ZFS afer mount + systemd.services.restart-services-mount = { + description = "Restart services after the ZFS dataset is mounted"; + wantedBy = [ "default.target" ]; + script = '' + sleep 5 + systemctl restart syncthing + systemctl restart radicale + systemctl restart gitea + ''; + serviceConfig.Type = "oneshot"; + requires = [ "sata-hat.service" ]; + after = [ "vault.mount" ]; + }; }