mirror of
https://github.com/nix-community/home-manager
synced 2024-11-24 03:59:46 +01:00
syncthing: expand service description
This models the user service on the upstream systemd file.
(cherry picked from commit cdb2bec909
)
This commit is contained in:
parent
68f0ed58c1
commit
e9cc225cbb
1 changed files with 15 additions and 11 deletions
|
@ -5,24 +5,28 @@ with lib;
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = mkEnableOption "Syncthing";
|
enable = mkEnableOption "Syncthing continuous file synchronization";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.services.syncthing.enable {
|
config = mkIf config.services.syncthing.enable {
|
||||||
systemd.user.services.syncthing = {
|
systemd.user.services.syncthing = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Syncthing";
|
Description = "Syncthing - Open Source Continuous File Synchronization";
|
||||||
After = [ "network.target" ];
|
Documentation = "man:syncthing(1)";
|
||||||
};
|
After = [ "network.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
Install = {
|
Service = {
|
||||||
WantedBy = [ "default.target" ];
|
ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -no-restart -logflags=0";
|
||||||
};
|
Restart = "on-failure";
|
||||||
|
SuccessExitStatus = [ 3 4 ];
|
||||||
|
RestartForceExitStatus = [ 3 4 ];
|
||||||
|
};
|
||||||
|
|
||||||
Service = {
|
Install = {
|
||||||
ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser";
|
WantedBy = [ "default.target" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue