mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
23 lines
492 B
Nix
23 lines
492 B
Nix
{ 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";
|
|
};
|
|
};
|
|
};
|
|
}
|