From ea7e267dcf8025a127e65f99b85dc6e2964ef955 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Tue, 25 Nov 2025 16:53:48 +0100 Subject: [PATCH] feat: keyd --- modules/hardware/default.nix | 1 + modules/hardware/keyd.nix | 29 +++++++++++++++++++++++++++++ modules/wm/hyprland/default.nix | 1 + 3 files changed, 31 insertions(+) create mode 100644 modules/hardware/keyd.nix 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 = [