diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 295367a..53ff11b 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -5,5 +5,6 @@ ./gpu/nvidia.nix ./wifi.nix ./fingerprint.nix + ./keyd.nix ]; } diff --git a/modules/hardware/keyd.nix b/modules/hardware/keyd.nix new file mode 100644 index 0000000..cfd17d7 --- /dev/null +++ b/modules/hardware/keyd.nix @@ -0,0 +1,29 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.horseman.hardware.keyd; +in { + options = { + horseman.hardware.keyd = { + enable = mkEnableOption "Kanata, the key remapper"; + }; + }; + + config = mkIf cfg.enable { + services.keyd = { + enable = true; + + keyboards.main = { + ids = ["*"]; + settings = { + main = { + capslock = "overload(control, esc)"; + }; + }; + }; + }; + }; +} diff --git a/modules/wm/hyprland/default.nix b/modules/wm/hyprland/default.nix index 862504e..3f9d1e7 100644 --- a/modules/wm/hyprland/default.nix +++ b/modules/wm/hyprland/default.nix @@ -44,6 +44,7 @@ in { ]; horseman.apps.visual.safeeyes.enable = true; + horseman.hardware.keyd.enable = true; horseman.wm.hyprland.config = { execOnce = [