From 650db2b016b2ba50f9204c573d9774c25b9c30ae Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Aug 2024 20:43:18 +0200 Subject: [PATCH] nixos/services.interception-tools: remove `with lib;` --- .../services/hardware/interception-tools.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/hardware/interception-tools.nix b/nixos/modules/services/hardware/interception-tools.nix index e69c05841ee0..d60e7ca59547 100644 --- a/nixos/modules/services/hardware/interception-tools.nix +++ b/nixos/modules/services/hardware/interception-tools.nix @@ -1,29 +1,26 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.interception-tools; in { options.services.interception-tools = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to enable the interception tools service."; }; - plugins = mkOption { - type = types.listOf types.package; + plugins = lib.mkOption { + type = lib.types.listOf lib.types.package; default = [ pkgs.interception-tools-plugins.caps2esc ]; - defaultText = literalExpression "[ pkgs.interception-tools-plugins.caps2esc ]"; + defaultText = lib.literalExpression "[ pkgs.interception-tools-plugins.caps2esc ]"; description = '' A list of interception tools plugins that will be made available to use inside the udevmon configuration. ''; }; - udevmonConfig = mkOption { - type = types.either types.str types.path; + udevmonConfig = lib.mkOption { + type = lib.types.either lib.types.str lib.types.path; default = '' - JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE" DEVICE: @@ -43,7 +40,7 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.interception-tools = { description = "Interception tools"; path = [ pkgs.bash pkgs.interception-tools ] ++ cfg.plugins;