{ config, pkgs, inputs, ... }: { # Workaround for tuxedo-drivers module bug in unstable (nixpkgs#480391) # The unstable module has a type error - use stable module until fix propagates disabledModules = [ "hardware/tuxedo-drivers.nix" ]; imports = [ "${inputs.nixpkgs-stable}/nixos/modules/hardware/tuxedo-drivers.nix" ]; hardware.nvidia = { prime = { offload.enable = false; # Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA intelBusId = "PCI:0:2:0"; # Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA nvidiaBusId = "PCI:1:0:0"; }; modesetting.enable = true; powerManagement.finegrained = false; powerManagement.enable = true; open = false; dynamicBoost.enable = true; nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.production; }; hardware.tuxedo-drivers.enable = true; hardware.bluetooth.enable = true; hardware.keyboard.zsa.enable = true; hardware.graphics.enable = true; services.hardware.bolt.enable = true; services.auto-cpufreq.enable = true; services.tlp = { enable = true; settings = { START_CHARGE_THRESH_BAT0 = 75; STOP_CHARGE_THRESH_BAT0 = 80; }; }; environment.systemPackages = with pkgs; [ tuxedo-backlight ]; security.sudo.extraRules = [{ users = [ "@wheel" ]; commands = [{ command = "/run/current-system/sw/bin/set-backlight"; options = [ "NOPASSWD" ]; }]; }]; }