NixOS configuration 馃獎
at refactor/style 41 lines 781 B view raw
1{ 2 config, 3 self, 4 lib, 5 pkgs, 6 ... 7}: 8let 9 inherit (lib.types) bool; 10 inherit (lib) mkIf; 11 inherit (lib.modules) mkMerge; 12 inherit (self.lib.modules) mkOpt; 13 14 cfg = config.sylveon.hardware.controller; 15 prof = config.sylveon.profiles; 16in 17{ 18 19 options.sylveon.hardware.controller = { 20 xbox.enable = 21 mkOpt bool prof.gaming.enable 22 "Whether or not xbox controller should be enabled or not"; 23 }; 24 25 config = mkMerge [ 26 (mkIf cfg.xbox.enable { 27 hardware = { 28 # Xbox controller configuration and kernel setup 29 xpadneo.enable = true; 30 31 # steam-hardware support and configuration 32 steam-hardware.enable = true; 33 }; 34 35 boot.extraModprobeConfig = '' 36 options bluetooth disable_ertm=Y 37 ''; 38 }) 39 ]; 40 41}