nixos/synergy: Restart services on failure.
Synergy seems to get more and more unstable in recent versions, so we might want to debug this properly. However, it makes sense to restart the service nevertheless, because synergy is about keyboard and mouse sharing and it's quite annoying to either SSH in to restart the service or even needing to unplug the keyboard and plug in into the machine with the failing service. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
2a1bf2a776
commit
e4caf0fde0
@ -89,6 +89,7 @@ in
|
||||
wantedBy = optional cfgC.autoStart "multi-user.target";
|
||||
path = [ pkgs.synergy ];
|
||||
serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergyc -f ${optionalString (cfgC.screenName != "") "-n ${cfgC.screenName}"} ${cfgC.serverAddress}'';
|
||||
serviceConfig.Restart = "on-failure";
|
||||
};
|
||||
})
|
||||
(mkIf cfgS.enable {
|
||||
@ -98,6 +99,7 @@ in
|
||||
wantedBy = optional cfgS.autoStart "multi-user.target";
|
||||
path = [ pkgs.synergy ];
|
||||
serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergys -c ${cfgS.configFile} -f ${optionalString (cfgS.address != "") "-a ${cfgS.address}"} ${optionalString (cfgS.screenName != "") "-n ${cfgS.screenName}" }'';
|
||||
serviceConfig.Restart = "on-failure";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user