2025-09-13 15:14:18 -04:00
|
|
|
{ config, libs, pkgs, inputs, ... }:
|
|
|
|
|
|
2025-09-13 15:10:42 -04:00
|
|
|
{
|
|
|
|
|
# Kanata setup
|
|
|
|
|
# Mostly copied from https://dev.to/shanu-kumawat/how-to-set-up-kanata-on-nixos-a-step-by-step-guide-1jkc
|
|
|
|
|
boot.kernelModules = [ "uinput" ]; # Enable uinput kernel module
|
|
|
|
|
hardware.uinput.enable = true; # Enable uinput
|
|
|
|
|
# Set up udev rules for uinput
|
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
|
KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
|
|
|
|
|
'';
|
|
|
|
|
users.groups.uinput = { }; # ensure uinput group exists
|
|
|
|
|
# Add Kanata service user to necessary groups
|
|
|
|
|
systemd.services.kanata-internalKeyboard.serviceConfig = {
|
|
|
|
|
SupplementaryGroups = [
|
|
|
|
|
"input"
|
|
|
|
|
"uinput"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
# Kanata configuration
|
|
|
|
|
services.kanata = {
|
|
|
|
|
enable = true;
|
|
|
|
|
keyboards = {
|
|
|
|
|
internalKeyboard = {
|
|
|
|
|
devices = [
|
|
|
|
|
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
|
|
|
|
|
];
|
2025-09-13 19:36:00 -04:00
|
|
|
configFile = builtins.fetchurl {
|
|
|
|
|
url = https://git.luluslly.xyz/lulusilly/dotfiles/raw/branch/master/.config/kanata/conf.kbd;
|
2025-09-15 13:47:42 -04:00
|
|
|
sha256 = "97947618d01cc8bd553c2d305537b9db6962a3a9205cda43abadc1b87eed901f";
|
2025-09-13 19:36:00 -04:00
|
|
|
};
|
2025-09-13 15:16:48 -04:00
|
|
|
};
|
2025-09-13 15:10:42 -04:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|