feat(keyboard): add enable option

This commit is contained in:
2026-05-22 20:19:57 +02:00
parent c6ea1433d3
commit ac4e8aacbd

View File

@@ -1,11 +1,19 @@
{ pkgs, ... }: {
lib,
config,
pkgs,
...
}:
with pkgs;
let let
tools = interception-tools; cfg = config.keyboard;
inherit (interception-tools-plugins) caps2esc; tools = pkgs.interception-tools;
inherit (pkgs.interception-tools-plugins) caps2esc;
in in
{ {
options.keyboard.enable = lib.mkEnableOption "keyboard remapping";
config = lib.mkIf cfg.enable {
services.interception-tools = { services.interception-tools = {
enable = true; enable = true;
plugins = [ caps2esc ]; plugins = [ caps2esc ];
@@ -16,4 +24,5 @@ in
EV_KEY: [KEY_CAPSLOCK] EV_KEY: [KEY_CAPSLOCK]
''; '';
}; };
};
} }