at 18.03-beta 498 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 cfg = config.services.logkeys; 7in { 8 options.services.logkeys = { 9 enable = mkEnableOption "logkeys service"; 10 }; 11 12 config = mkIf cfg.enable { 13 systemd.services.logkeys = { 14 description = "LogKeys Keylogger Daemon"; 15 wantedBy = [ "multi-user.target" ]; 16 serviceConfig = { 17 ExecStart = "${pkgs.logkeys}/bin/logkeys -s"; 18 ExecStop = "${pkgs.logkeys}/bin/logkeys -k"; 19 Type = "forking"; 20 }; 21 }; 22 }; 23}