From 3016f96341633dbb44432665ec92e33152ab4414 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 17 Aug 2023 18:48:22 -0300 Subject: [PATCH] kmonad config for rotterdam --- flake.nix | 2 +- hosts/desktops/rotterdam.nix | 11 ++++++++++- hosts/desktops/rotterdam/kmonad.kbd | 29 +++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 hosts/desktops/rotterdam/kmonad.kbd diff --git a/flake.nix b/flake.nix index c8fcbda..a95b417 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,7 @@ modules = [ ./hosts/desktops/rotterdam.nix agenix.nixosModules.default + kmonad.nixosMofules.default { nixpkgs.overlays = [ baduhai-nur.overlay agenix.overlays.default ]; @@ -82,7 +83,6 @@ ./hosts/desktops/io.nix agenix.nixosModules.default kmonad.nixosModules.default - home-manager.nixosModules.default { nixpkgs.overlays = [ baduhai-nur.overlay agenix.overlays.default ]; diff --git a/hosts/desktops/rotterdam.nix b/hosts/desktops/rotterdam.nix index 7201996..95c80c3 100644 --- a/hosts/desktops/rotterdam.nix +++ b/hosts/desktops/rotterdam.nix @@ -12,7 +12,16 @@ networking.hostName = "rotterdam"; - services.hardware.openrgb.enable = true; + services = { + hardware.openrgb.enable = true; + kmonad = { + enable = true; + keyboards.default = { + device = "/dev/input/by-path/pci-0000:0a:00.3-usb-0:2:1.0-event-kbd"; + config = builtins.readFile ./rotterdam/kmonad.kbd; + }; + }; + }; systemd.targets.hibernate.enable = false; # disable non-functional hibernate diff --git a/hosts/desktops/rotterdam/kmonad.kbd b/hosts/desktops/rotterdam/kmonad.kbd new file mode 100644 index 0000000..5faee3f --- /dev/null +++ b/hosts/desktops/rotterdam/kmonad.kbd @@ -0,0 +1,29 @@ +(defcfg + input (device-file "/dev/input/by-path/pci-0000:0a:00.3-usb-0:2:1.0-event-kbd") + output (uinput-sink "KMonad Virtal Keyboard" + "/run/current-system/sw/bin/sleep 1 && /run/current-system/sw/bin/setxkbmap -option compose:ralt") + cmp-seq ralt + cmp-seq-delay 5 + fallthrough true + allow-cmd false +) + +(defalias + cps (tap-hold 200 esc caps) +) + +(defsrc + esc 1 2 3 4 5 6 7 8 9 10 - = bspc + tab q w e r t y u i o p [ ] \ + caps a s d f g h j k l ; ' ret + lsft z x c v b n m , . / del up rsft + lctl lmet lalt spc ralt left down rght +) + +(defsrc + esc 1 2 3 4 5 6 7 8 9 10 - = bspc + tab q w e r t y u i o p [ ] \ + @cps a s d f g h j k l ; ' ret + lsft z x c v b n m , . / del up rsft + lctl lmet lalt spc ralt left down rght +)