fixed syncthing service to work as expected

authored by Enrico Fasoli and committed by Rok Garbas 44788bb2 7182ef35

+2 -10
+2 -10
nixos/modules/services/networking/syncthing.nix
··· 36 36 dataDir = mkOption { 37 37 default = "/var/lib/syncthing"; 38 38 description = '' 39 - Path where the `.syncthing` (settings and keys) and `Sync` 40 - (your synced files) directories will exist. This can be your home 41 - directory. 39 + Path where the settings and keys will exist. 42 40 ''; 43 41 }; 44 42 ··· 57 55 after = [ "network.target" ]; 58 56 wantedBy = [ "multi-user.target" ]; 59 57 environment.STNORESTART = "placeholder"; # do not self-restart 60 - environment.HOME = "${cfg.dataDir}"; 61 58 serviceConfig = { 62 59 User = "${cfg.user}"; 63 60 PermissionsStartOnly = true; 64 61 Restart = "always"; 65 - ExecStart = "${pkgs.syncthing}/bin/syncthing -home=${cfg.dataDir}/.syncthing"; 62 + ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -home=${cfg.dataDir}"; 66 63 }; 67 - preStart = '' 68 - mkdir -p ${cfg.dataDir} 69 - chown ${cfg.user} ${cfg.dataDir} 70 - ''; 71 - 72 64 }; 73 65 74 66 environment.systemPackages = [ pkgs.syncthing ];