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 {
|
in {
|
||||||
options.services.logkeys = {
|
options.services.logkeys = {
|
||||||
enable = mkEnableOption "logkeys service";
|
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 {
|
config = mkIf cfg.enable {
|
||||||
@ -14,7 +21,7 @@ in {
|
|||||||
description = "LogKeys Keylogger Daemon";
|
description = "LogKeys Keylogger Daemon";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
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";
|
ExecStop = "${pkgs.logkeys}/bin/logkeys -k";
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
};
|
};
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
{ stdenv, fetchgit, autoconf, automake, which, procps, kbd }:
|
{ stdenv, fetchFromGitHub, autoconf, automake, which, procps, kbd }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "logkeys-${version}";
|
name = "logkeys-${version}";
|
||||||
version = "2017-10-10";
|
version = "2018-01-22";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchFromGitHub {
|
||||||
url = https://github.com/kernc/logkeys;
|
owner = "kernc";
|
||||||
rev = "5c368327a2cd818efaed4794633c260b90b87abf";
|
repo = "logkeys";
|
||||||
sha256 = "0akj7j775y9c0p53zq5v12jk3fy030fpdvn5m1x9w4rdj47vxdpg";
|
rev = "7a9f19fb6b152d9f00a0b3fe29ab266ff1f88129";
|
||||||
|
sha256 = "1k6kj0913imwh53lh6hrhqmrpygqg2h462raafjsn7gbd3vkgx8n";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ autoconf automake which procps kbd ];
|
buildInputs = [ autoconf automake which procps kbd ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user