feat: nvidia stable driver with idle reset, home-manager 26.05, python312 and ffmpeg

This commit is contained in:
RootHost-Stormwind committed 2026-10-20 16:57:44 +02:00
1 parent 6e88c6390d
commit c2c08f7111
3 files changed
+34 -4

No files matched your search

+25 -2
View File
@@ -12,7 +12,7 @@
boot.initrd.kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_type1" "ahci" ];
# 2) Also load them again in the running system
boot.kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_typoe1" "ahci" ];
boot.kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_type1" "ahci" ];
# 3) Kernel params to turn on IOMMU and bind your card to vfio-pci
boot.kernelParams = lib.mkForce [
@@ -62,12 +62,35 @@
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
powerManagement.enable = true;
open = false; # <--- this must be false for proprietary
nvidiaSettings = true;
nvidiaPersistenced = true;
};
systemd.services.nvidia-idle-reset = {
description = "Reset NVIDIA clocks so idle GPU can enter low-power P8";
wantedBy = [ "multi-user.target" ];
after = [ "nvidia-persistenced.service" "systemd-udev-settle.service" ];
wants = [ "nvidia-persistenced.service" "systemd-udev-settle.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
path = [ config.boot.kernelPackages.nvidiaPackages.stable ];
script = ''
nvidia-smi -pm 1 || true
nvidia-smi --auto-boost-default=0 || true
nvidia-smi -rgc || true
nvidia-smi -rmc || true
'';
};
nixpkgs.config.allowUnfree = true;
nixpkgs.config.nvidia.acceptLicense = true;
}