ExecStart = register-script;
};
};
+ systemd.services.syncthing-reregister = {
+ after = [ "syncthing-autoregister.service" ];
+ script = ''
+ ${pkgs.coreutils}/bin/sleep 1
+ ${pkgs.systemd}/bin/systemctl restart syncthing-autoregister
+ '';
+ serviceConfig = {
+ Type = "oneshot";
+ };
+ };
+ systemd.paths.syncthing-reregister = {
+ pathConfig.PathChanged = cfg.path;
+ wantedBy = [ "multi-user.target" ];
+ };
};
}