nixos/services.logkeys: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-24 22:05:47 +02:00
parent 25e0bc25f6
commit a11ac85d65

View File

@ -1,22 +1,19 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
let let
cfg = config.services.logkeys; cfg = config.services.logkeys;
in { in {
options.services.logkeys = { options.services.logkeys = {
enable = mkEnableOption "logkeys, a keylogger service"; enable = lib.mkEnableOption "logkeys, a keylogger service";
device = mkOption { device = lib.mkOption {
description = "Use the given device as keyboard input event device instead of /dev/input/eventX default."; description = "Use the given device as keyboard input event device instead of /dev/input/eventX default.";
default = null; default = null;
type = types.nullOr types.str; type = lib.types.nullOr lib.types.str;
example = "/dev/input/event15"; example = "/dev/input/event15";
}; };
}; };
config = mkIf cfg.enable { config = lib.mkIf cfg.enable {
systemd.services.logkeys = { systemd.services.logkeys = {
description = "LogKeys Keylogger Daemon"; description = "LogKeys Keylogger Daemon";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];