mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
nixos/synergy: Use graphical target (fixes #9468)
This commit is contained in:
parent
13d55dd65a
commit
9a63f51454
@ -83,20 +83,20 @@ in
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfgC.enable {
|
||||
systemd.services."synergy-client" = {
|
||||
after = [ "network.target" ];
|
||||
systemd.user.services."synergy-client" = {
|
||||
after = [ "network.target" "graphical-session.target" ];
|
||||
description = "Synergy client";
|
||||
wantedBy = optional cfgC.autoStart "multi-user.target";
|
||||
wantedBy = optional cfgC.autoStart "graphical-session.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 {
|
||||
systemd.services."synergy-server" = {
|
||||
after = [ "network.target" ];
|
||||
systemd.user.services."synergy-server" = {
|
||||
after = [ "network.target" "graphical-session.target" ];
|
||||
description = "Synergy server";
|
||||
wantedBy = optional cfgS.autoStart "multi-user.target";
|
||||
wantedBy = optional cfgS.autoStart "graphical-session.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