forked from mirrors/nixpkgs
Merge pull request #35280 from markus1189/logkeys
Logkeys: Update and add `device` option to service
This commit is contained in:
commit
a4a2626cd9
|
@ -7,6 +7,13 @@ let
|
|||
in {
|
||||
options.services.logkeys = {
|
||||
enable = mkEnableOption "logkeys service";
|
||||
|
||||
device = mkOption {
|
||||
description = "Use the given device as keyboard input event device instead of /dev/input/eventX default.";
|
||||
default = null;
|
||||
type = types.nullOr types.string;
|
||||
example = "/dev/input/event15";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -14,7 +21,7 @@ in {
|
|||
description = "LogKeys Keylogger Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.logkeys}/bin/logkeys -s";
|
||||
ExecStart = "${pkgs.logkeys}/bin/logkeys -s${lib.optionalString (cfg.device != null) " -d ${cfg.device}"}";
|
||||
ExecStop = "${pkgs.logkeys}/bin/logkeys -k";
|
||||
Type = "forking";
|
||||
};
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{ stdenv, fetchgit, autoconf, automake, which, procps, kbd }:
|
||||
{ stdenv, fetchFromGitHub, autoconf, automake, which, procps, kbd }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "logkeys-${version}";
|
||||
version = "2017-10-10";
|
||||
version = "2018-01-22";
|
||||
|
||||
src = fetchgit {
|
||||
url = https://github.com/kernc/logkeys;
|
||||
rev = "5c368327a2cd818efaed4794633c260b90b87abf";
|
||||
sha256 = "0akj7j775y9c0p53zq5v12jk3fy030fpdvn5m1x9w4rdj47vxdpg";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kernc";
|
||||
repo = "logkeys";
|
||||
rev = "7a9f19fb6b152d9f00a0b3fe29ab266ff1f88129";
|
||||
sha256 = "1k6kj0913imwh53lh6hrhqmrpygqg2h462raafjsn7gbd3vkgx8n";
|
||||
};
|
||||
|
||||
buildInputs = [ autoconf automake which procps kbd ];
|
||||
|
|
Loading…
Reference in a new issue