Merge pull request #35280 from markus1189/logkeys

Logkeys: Update and add `device` option to service

Changed files
+15 -7
nixos
modules
services
pkgs
tools
security
logkeys
+8 -1
nixos/modules/services/misc/logkeys.nix
···
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 {
···
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";
};
+7 -6
pkgs/tools/security/logkeys/default.nix
···
-
{ 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 ];