gaming.nix (568B)
1 { config, lib, pkgs, ... }: 2 3 with lib; 4 let 5 cfg = config.profiles.gaming; 6 in 7 { 8 options = { 9 profiles.gaming = { 10 enable = mkEnableOption "Enable gaming profile"; 11 }; 12 }; 13 config = mkIf cfg.enable { 14 hardware = { 15 opengl = { 16 driSupport32Bit = true; 17 }; 18 }; 19 services.udev.extraRules = '' 20 # Steam controller 21 SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666" 22 KERNEL=="uinput", MODE="0660", GROUP="users", OPTIONS+="static_node=uinput" 23 ''; 24 environment.systemPackages = with pkgs; [ steam ]; 25 }; 26 }