feat(keyboard): add enable option
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with pkgs;
|
||||
let
|
||||
tools = interception-tools;
|
||||
inherit (interception-tools-plugins) caps2esc;
|
||||
cfg = config.keyboard;
|
||||
tools = pkgs.interception-tools;
|
||||
inherit (pkgs.interception-tools-plugins) caps2esc;
|
||||
in
|
||||
{
|
||||
options.keyboard.enable = lib.mkEnableOption "keyboard remapping";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.interception-tools = {
|
||||
enable = true;
|
||||
plugins = [ caps2esc ];
|
||||
@@ -16,4 +24,5 @@ in
|
||||
EV_KEY: [KEY_CAPSLOCK]
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user