mirror of
https://github.com/nix-community/home-manager
synced 2024-11-22 20:53:14 +00:00
syncthing: expand service description
This models the user service on the upstream systemd file.
This commit is contained in:
parent
dd5061d73b
commit
cdb2bec909
1 changed files with 15 additions and 11 deletions
|
@ -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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue