From cdb0038052662731a8fa25058ae8a3d6fd72999d Mon Sep 17 00:00:00 2001 From: The Admin Date: Wed, 26 Apr 2017 00:53:50 +0200 Subject: [PATCH] logkeys module: init --- nixos/modules/module-list.nix | 1 + nixos/modules/services/misc/logkeys.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 nixos/modules/services/misc/logkeys.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index adb21f7b7d95..04d25c371e66 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -304,6 +304,7 @@ #./services/misc/ihaskell.nix ./services/misc/irkerd.nix ./services/misc/jackett.nix + ./services/misc/logkeys.nix ./services/misc/leaps.nix ./services/misc/mantisbt.nix ./services/misc/mathics.nix diff --git a/nixos/modules/services/misc/logkeys.nix b/nixos/modules/services/misc/logkeys.nix new file mode 100644 index 000000000000..6051c884465d --- /dev/null +++ b/nixos/modules/services/misc/logkeys.nix @@ -0,0 +1,23 @@ +{ config, lib, ... }: + +with lib; + +let + cfg = config.services.logkeys; +in { + options.services.logkeys = { + enable = mkEnableOption "logkeys service"; + }; + + config = mkIf cfg.enable { + systemd.services.logkeys = { + description = "LogKeys Keylogger Daemon"; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + ExecStart = "${pkgs.logkeys}/bin/logkeys -s"; + ExecStop = "${pkgs.logkeys}/bin/logkeys -k"; + Type = "forking"; + }; + }; + }; +}