feat(keyboard): add enable option
This commit is contained in:
@@ -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]
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user