Files
nixos-config/hosts/m3-ares/hardware.nix

50 lines
1.5 KiB
Nix
Raw Normal View History

{ 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" ];
2024-12-16 11:28:41 +01:00
hardware.nvidia = {
prime = {
offload.enable = false;
2024-12-06 07:16:50 +01:00
2024-12-16 11:28:41 +01:00
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
intelBusId = "PCI:0:2:0";
2024-12-06 07:16:50 +01:00
2024-12-16 11:28:41 +01:00
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
nvidiaBusId = "PCI:1:0:0";
2024-12-06 07:16:50 +01:00
};
2024-12-16 11:28:41 +01:00
modesetting.enable = true;
powerManagement.finegrained = false;
powerManagement.enable = true;
open = false;
dynamicBoost.enable = true;
nvidiaSettings = true;
2026-01-03 09:31:59 +01:00
package = config.boot.kernelPackages.nvidiaPackages.production;
2024-12-06 07:16:50 +01:00
};
2025-09-08 04:40:19 +02:00
hardware.tuxedo-drivers.enable = true;
2024-12-16 11:28:41 +01:00
hardware.bluetooth.enable = true;
hardware.keyboard.zsa.enable = true;
hardware.graphics.enable = true;
2024-12-06 07:16:50 +01:00
services.hardware.bolt.enable = true;
services.auto-cpufreq.enable = true;
2025-09-08 04:40:19 +02:00
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" ];
}];
}];
2024-12-06 07:16:50 +01:00
}