2008-03-16 16:52:52 +01:00
|
|
|
{ path, thisConfig, config, lib, pkgs, upstartHelpers } : with upstartHelpers; {
|
|
|
|
options = {
|
|
|
|
description = "synergy client lets you use a shared keyboard, mouse and clipboard";
|
|
|
|
screenName = mkOption {
|
|
|
|
default = "";
|
|
|
|
description = "
|
|
|
|
use screen-name instead the hostname to identify
|
|
|
|
ourselfs to the server.
|
|
|
|
";
|
|
|
|
apply = x: "-n '${x}'";
|
|
|
|
};
|
|
|
|
address = mkOption {
|
|
|
|
default = "";
|
|
|
|
description = "server address to connect to";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
jobs = [ ( rec {
|
|
|
|
name = "synergyc";
|
|
|
|
|
|
|
|
# TODO start only when X Server has started as well
|
|
|
|
job = "
|
|
|
|
description \"${name}\"
|
|
|
|
|
|
|
|
start on network-interfaces/started
|
|
|
|
stop on network-interfaces/stop
|
|
|
|
|
2008-03-25 01:14:05 +01:00
|
|
|
exec ${pkgs.synergy}/bin/synergyc -f ${configV "screenName"} ${configV "address"}
|
2008-03-16 16:52:52 +01:00
|
|
|
";
|
|
|
|
|
|
|
|
} ) ];
|
|
|
|
}
|