diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-10-13 02:46:37 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-10-13 04:42:39 +0200 |
commit | e4caf0fde09146000f4b7b0c29413a059704d9c3 (patch) | |
tree | 8624f928d3fc7ba0f46b72ece2bc06d414ec5ec6 /nixos/modules/services/misc/synergy.nix | |
parent | 2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff (diff) | |
download | nixpkgs-e4caf0fde09146000f4b7b0c29413a059704d9c3.tar nixpkgs-e4caf0fde09146000f4b7b0c29413a059704d9c3.tar.gz nixpkgs-e4caf0fde09146000f4b7b0c29413a059704d9c3.tar.bz2 nixpkgs-e4caf0fde09146000f4b7b0c29413a059704d9c3.tar.lz nixpkgs-e4caf0fde09146000f4b7b0c29413a059704d9c3.tar.xz nixpkgs-e4caf0fde09146000f4b7b0c29413a059704d9c3.tar.zst nixpkgs-e4caf0fde09146000f4b7b0c29413a059704d9c3.zip |
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>
Diffstat (limited to 'nixos/modules/services/misc/synergy.nix')
-rw-r--r-- | nixos/modules/services/misc/synergy.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/synergy.nix b/nixos/modules/services/misc/synergy.nix index 054df965347..7e8eadbe5f3 100644 --- a/nixos/modules/services/misc/synergy.nix +++ b/nixos/modules/services/misc/synergy.nix @@ -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"; }; }) ]; |