diff --git a/modules/nixos/services/input/default.nix b/modules/nixos/services/input/default.nix index ef8bfe5..00d33e4 100644 --- a/modules/nixos/services/input/default.nix +++ b/modules/nixos/services/input/default.nix @@ -2,11 +2,13 @@ { imports = [ ./kanata.nix + ./keyd.nix ./touchpad.nix ./vial.nix ]; - kanata.enable = lib.mkDefault true; + services.kanata.enable = lib.mkDefault false; + services.keyd.enable = lib.mkDefault true; touchpad.enable = lib.mkDefault false; vial.enable = lib.mkDefault false; } diff --git a/modules/nixos/services/input/kanata.nix b/modules/nixos/services/input/kanata.nix index 68ae863..7bc5074 100644 --- a/modules/nixos/services/input/kanata.nix +++ b/modules/nixos/services/input/kanata.nix @@ -5,36 +5,32 @@ ... }: { - options = { - kanata.enable = lib.mkEnableOption "Enable kanata for keyboard remapping"; - }; + # options.kanata.enable = lib.mkEnableOption "Enable kanata for keyboard remapping"; - config = lib.mkIf config.kanata.enable { - services = { - kanata = { - enable = true; - keyboards."base".config = '' - (defsrc - caps - ) + # config = lib.mkIf config.kanata.enable { + services = { + kanata = { + # enable = true; + keyboards."base".config = '' + (defsrc + caps + ) - (defalias - esccaps (tap-hold 100 100 esc esc) - ) + (defalias + esccaps (tap-hold 100 100 esc esc) + ) - (deflayer base - @esccaps - ) - ''; - }; - udev = { - packages = with pkgs; [ - kanata - ]; - # extraRules = '' - # KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput" - # ''; - }; + (deflayer base + @esccaps + ) + ''; + }; + udev = { + packages = [ pkgs.unstable.kanata ]; + # extraRules = '' + # KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput" + # ''; }; }; + # }; } diff --git a/modules/nixos/services/input/keyd.nix b/modules/nixos/services/input/keyd.nix new file mode 100644 index 0000000..eca1adf --- /dev/null +++ b/modules/nixos/services/input/keyd.nix @@ -0,0 +1,15 @@ +{ + services.keyd = { + keyboards = { + default = { + ids = [ "*" ]; + settings = { + main = { + capslock = "overload(meta, esc)"; + esc = "overload(esc, capslock)"; + }; + }; + }; + }; + }; +} diff --git a/modules/nixos/services/input/vial.nix b/modules/nixos/services/input/vial.nix index 49f0fcf..8923c2f 100644 --- a/modules/nixos/services/input/vial.nix +++ b/modules/nixos/services/input/vial.nix @@ -5,9 +5,7 @@ ... }: { - options = { - vial.enable = lib.mkEnableOption "Support vial for custom keyboards"; - }; + options.vial.enable = lib.mkEnableOption "Support vial for custom keyboards"; config = lib.mkIf config.vial.enable { # Packages with udev rules