about summary refs log tree commit diff
path: root/nixos/modules/services/misc/logkeys.nix
blob: df0b3ae24c90143ab57cc1ac74d6286ec92c85aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ 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";
      };
    };
  };
}