description = ''
Path of nix module file to write our syncthing
device id into. It will be written into
- services.syncthing.declarative.devices.<hostname>.id. This file
+ services.syncthing.devices.<hostname>.id. This file
can be imported as a NixOS module.
We recommend using a separate file just for this purpose. I.e.,
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" ];
+ };
};
}