nixpkgs-suyu/nixos/modules/services/misc/logkeys.nix
2017-12-23 01:44:14 +00:00

23 lines
498 B
Nix

{ config, lib, pkgs, ... }:
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";
};
};
};
}