git.iko.soy/typeable/nixpkgs
on master help sign in
syncthing: update systemd service config according to upstream example

The example service config were taken from the syncthing repo: https://github.com/syncthing/syncthing/blob/master/etc/linux-systemd/system/syncthing@.service

commit9f191abad14fb10d3ef843e98ab055894248ca2d authorSergey Mironov <grrwlf@gmail.com> dateMon 21 Sep 2015, 21:17 (11 years ago) parent54e430a
1 file changed+5−2
nixos/modules/services/networking/syncthing.nix+5−2
nixos/modules/services/networking/syncthing.nix+5−2
@@ -54,12 +54,15 @@ in
5454 description = "Syncthing service";
5555 after = [ "network.target" ];
5656 wantedBy = [ "multi-user.target" ];
57− environment.STNORESTART = "placeholder"; # do not self-restart
57+ environment.STNORESTART = "yes"; # do not self-restart
58+ environment.STNOUPGRADE = "yes";
5859 serviceConfig = {
5960 User = "${cfg.user}";
6061 PermissionsStartOnly = true;
61− Restart = "always";
62+ Restart = "on-failure";
6263 ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -home=${cfg.dataDir}";
64+ SuccessExitStatus = "2 3 4";
65+ RestartForceExitStatus="3 4";
6366 };
6467 };
6568