default.nix (4268B)
1 extra: 2 { config, lib, pkgs, ... }: 3 let 4 kindle-opts = ["noatime" "user" "gid=100" "uid=1000" "utf8" "x-systemd.automount"]; 5 in 6 { 7 boot.supportedFilesystems = ["ntfs" "exfat"]; 8 9 services.udev.extraRules = '' 10 # coldcard 11 KERNEL=="hidraw*", ATTRS{idVendor}=="d13e", ATTRS{idProduct}=="cc10", GROUP="plugdev", MODE="0666", SYMLINK+="coldcard 12 13 # yubikey neo 14 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0116", MODE="0666", SYMLINK+="yubikey-neo" 15 16 # yubikey4 17 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0407", MODE="0666", SYMLINK+="yubikey4" 18 19 # kindle 20 ATTRS{idVendor}=="1949", ATTRS{idProduct}=="0004", SYMLINK+="kindle" 21 ATTRS{idVendor}=="1949", ATTRS{idProduct}=="0003", SYMLINK+="kindledx" 22 23 # HTC Vive HID Sensor naming and permissioning 24 # vive hmd 25 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="2c87", TAG+="uaccess" 26 27 # vive controller 28 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2101", TAG+="uaccess" 29 30 # vive lighthouse 31 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2000", TAG+="uaccess" 32 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1043", TAG+="uaccess" 33 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2050", TAG+="uaccess" 34 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2011", TAG+="uaccess" 35 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2012", TAG+="uaccess" 36 37 # vive audio 38 KERNEL=="hidraw*", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="0012", MODE="0666" 39 40 SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="2c87", TAG+="uaccess" 41 42 # HTC Camera USB Node 43 SUBSYSTEM=="usb", ATTRS{idVendor}=="114d", ATTRS{idProduct}=="8328", TAG+="uaccess" 44 45 # HTC Mass Storage Node 46 SUBSYSTEM=="usb", ATTRS{idVendor}=="114d", ATTRS{idProduct}=="8200", TAG+="uaccess" 47 48 # ds4 49 KERNEL=="uinput", MODE="0666" 50 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666" 51 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:054C:05C4.*", MODE="0666" 52 53 # Nintendo Switch Pro Controller over USB hidraw 54 KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0666" 55 56 # Nintendo Switch Pro Controller over bluetooth hidraw 57 KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0666" 58 59 # rtl-sdr 60 SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", MODE="0666", SYMLINK+="rtl_sdr" 61 SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE="0666", SYMLINK+="rtl_sdr_dvb" 62 63 # arduino 64 SUBSYSTEM=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0043", MODE="0666", SYMLINK+="arduino" 65 ''; 66 67 services.xserver.config = '' 68 Section "InputClass" 69 Identifier "Logitech M705" 70 MatchIsPointer "yes" 71 Option "AccelerationProfile" "-1" 72 Option "ConstantDeceleration" "5" 73 Option "AccelerationScheme" "none" 74 Option "AccelSpeed" "-1" 75 EndSection 76 77 Section "InputClass" 78 Identifier "Razer Razer DeathAdder 2013" 79 MatchIsPointer "yes" 80 Option "AccelerationProfile" "-1" 81 Option "ConstantDeceleration" "5" 82 Option "AccelerationScheme" "none" 83 Option "AccelSpeed" "-1" 84 EndSection 85 ''; 86 87 #services.printing.drivers = [ pkgs.cups-brother-hll2370dw ]; 88 89 boot.blacklistedKernelModules = ["dvb_usb_rtl28xxu"]; 90 fileSystems."/media/kindle" = 91 { device = "/dev/kindle"; 92 fsType = "vfat"; 93 options = kindle-opts; 94 }; 95 96 fileSystems."/media/kindledx" = 97 { device = "/dev/kindledx"; 98 fsType = "vfat"; 99 options = kindle-opts; 100 }; 101 102 103 hardware.pulseaudio.enable = true; 104 hardware.pulseaudio.support32Bit = true; 105 hardware.pulseaudio.package = if extra.is-minimal then pkgs.pulseaudio else pkgs.pulseaudioFull; 106 hardware.pulseaudio.daemon.config = { 107 default-sample-rate = "48000"; 108 }; 109 110 hardware = { 111 bluetooth.enable = true; 112 opengl.driSupport32Bit = true; 113 opengl.driSupport = true; 114 }; 115 }