From 6066b1bbe2c1cdaa8b0085a92071c11d64e9abbf Mon Sep 17 00:00:00 2001 From: Akshay Date: Tue, 14 Jun 2022 22:07:53 +0530 Subject: stuff for colemak --- hosts/olive/configuration.nix | 13 ++++---- hosts/olive/qmk.rules | 74 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 hosts/olive/qmk.rules (limited to 'hosts') diff --git a/hosts/olive/configuration.nix b/hosts/olive/configuration.nix index 66b5bdc..5ecce25 100644 --- a/hosts/olive/configuration.nix +++ b/hosts/olive/configuration.nix @@ -18,12 +18,12 @@ interfaces = [ "wlp2s0" ]; - environmentFile = "/run/secrets/wireless.env"; + environmentFile = "/home/np/.wireless.env"; networks = { - Sanic.pskRaw = "@PSK_SANI@"; - Gopalan.pskRaw = "@PSK_GOPA@"; - Srividhya.pskRaw = "@PSK_SRIV@"; - sage.pskRaw = "@PSK_SAGE@"; + Sanic.psk = "@PSK_SANI@"; + Gopalan.psk = "@PSK_GOPA@"; + Srividhya.psk = "@PSK_SRIV@"; + sage.psk = "@PSK_SAGE@"; }; extraConfig = '' ctrl_interface=/run/wpa_supplicant @@ -103,7 +103,6 @@ services.xserver = { enable = true; layout = "us"; - xkbOptions = "caps:swapescape"; displayManager.startx.enable = true; libinput.enable = true; }; @@ -114,6 +113,8 @@ suspendCapacity = 10; }; + services.udev.extraRules = builtins.readFile ./qmk.rules; + users.users.np = { isNormalUser = true; home = "/home/np"; diff --git a/hosts/olive/qmk.rules b/hosts/olive/qmk.rules new file mode 100644 index 0000000..57806f9 --- /dev/null +++ b/hosts/olive/qmk.rules @@ -0,0 +1,74 @@ +# Atmel DFU +### ATmega16U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess" +### ATmega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess" +### ATmega16U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess" +### ATmega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess" +### AT90USB64 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess" +### AT90USB162 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess" +### AT90USB128 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess" + +# Input Club +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess" + +# STM32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess" +# STM32 DFU +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess" + +# BootloadHID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess" + +# USBAspLoader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess" + +# ModemManager should ignore the following devices +# Atmel SAM-BA (Massdrop) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Caterina (Pro Micro) +## pid.codes shared PID +### Keyboardio Atreus 2 Bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Spark Fun Electronics +### Pro Micro 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Pro Micro 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### LilyPad 3V3/8MHz (and some Pro Micro clones) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Pololu Electronics +### A-Star 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Arduino SA +### Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Micro +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Adafruit Industries LLC +### Feather 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### ItsyBitsy 32U4 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### ItsyBitsy 32U4 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## dog hunter AG +### Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Micro +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + +# hid_listen +KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl" + +# hid bootloaders +## QMK HID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess" +## PJRC's HalfKay +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess" -- cgit v1.2.3