From e9cc225cbbab218fe99f2759207835dd33cac60b Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 18 Jul 2017 13:49:02 +0200 Subject: [PATCH] syncthing: expand service description This models the user service on the upstream systemd file. (cherry picked from commit cdb2bec909cfdd808765778b3d8c447e4133b8c3) --- modules/services/syncthing.nix | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/modules/services/syncthing.nix b/modules/services/syncthing.nix index 3a6bf023e..5da3a8cf0 100644 --- a/modules/services/syncthing.nix +++ b/modules/services/syncthing.nix @@ -5,24 +5,28 @@ with lib; { options = { services.syncthing = { - enable = mkEnableOption "Syncthing"; + enable = mkEnableOption "Syncthing continuous file synchronization"; }; }; config = mkIf config.services.syncthing.enable { systemd.user.services.syncthing = { - Unit = { - Description = "Syncthing"; - After = [ "network.target" ]; - }; + Unit = { + Description = "Syncthing - Open Source Continuous File Synchronization"; + Documentation = "man:syncthing(1)"; + After = [ "network.target" ]; + }; - Install = { - WantedBy = [ "default.target" ]; - }; + Service = { + ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -no-restart -logflags=0"; + Restart = "on-failure"; + SuccessExitStatus = [ 3 4 ]; + RestartForceExitStatus = [ 3 4 ]; + }; - Service = { - ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser"; - }; + Install = { + WantedBy = [ "default.target" ]; + }; }; }; }