nixos/synergy: Don't generate units unecessarily
This commit is contained in:
parent
159af942d5
commit
8297e09d78
|
@ -81,27 +81,26 @@ in
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = {
|
config = mkMerge [
|
||||||
|
(mkIf cfgC.enable {
|
||||||
systemd.services."synergy-client" = {
|
systemd.services."synergy-client" = {
|
||||||
enable = cfgC.enable;
|
after = [ "network.target" ];
|
||||||
after = [ "network.target" ];
|
description = "Synergy client";
|
||||||
description = "Synergy client";
|
wantedBy = [ "multi-user.target" ];
|
||||||
wantedBy = optional cfgC.autoStart "multi-user.target";
|
path = [ pkgs.synergy ];
|
||||||
path = [ pkgs.synergy ];
|
serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergyc -f ${optionalString (cfgC.screenName != "") "-n ${cfgC.screenName}"} ${cfgC.serverAddress}'';
|
||||||
serviceConfig.ExecStart = ''${pkgs.synergy}/bin/synergyc -f ${optionalString (cfgC.screenName != "") "-n ${cfgC.screenName}"} ${cfgC.serverAddress}'';
|
};
|
||||||
};
|
})
|
||||||
|
(mkIf cfgS.enable {
|
||||||
systemd.services."synergy-server" = {
|
systemd.services."synergy-server" = {
|
||||||
enable = cfgS.enable;
|
after = [ "network.target" ];
|
||||||
after = [ "network.target" ];
|
description = "Synergy server";
|
||||||
description = "Synergy server";
|
wantedBy = [ "multi-user.target" ];
|
||||||
wantedBy = optional cfgS.autoStart "multi-user.target";
|
path = [ pkgs.synergy ];
|
||||||
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.ExecStart = ''${pkgs.synergy}/bin/synergys -c ${cfgS.configFile} -f ${optionalString (cfgS.address != "") "-a ${cfgS.address}"} ${optionalString (cfgS.screenName != "") "-n ${cfgS.screenName}" }'';
|
};
|
||||||
};
|
})
|
||||||
|
];
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue