Files
nixos-config/hosts/m3-ares/hardware.nix
m3tm3re 048244f122 fix(m3-ares): use stable tuxedo-drivers module to work around nixpkgs#480391
The unstable tuxedo-drivers module has a type error where cfg.settings
(a set) is passed directly to lib.any which expects a list. This was
introduced in commit 15d9ec6 and fixed in a77e30e, but the fix hasn't
propagated to our nixpkgs input yet.

Workaround: disable the unstable module and import from nixpkgs-stable.
2026-01-19 19:24:34 +01:00

50 lines
1.5 KiB
Nix

{ 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" ];
}];
}];
}