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" ]; boot.initrd.kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_type1" "ahci" ];
# 2) Also load them again in the running system # 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 # 3) Kernel params to turn on IOMMU and bind your card to vfio-pci
boot.kernelParams = lib.mkForce [ boot.kernelParams = lib.mkForce [
@@ -62,12 +62,35 @@
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = { hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.legacy_470; package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = true; powerManagement.enable = true;
open = false; # <--- this must be false for proprietary open = false; # <--- this must be false for proprietary
nvidiaSettings = true; 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.allowUnfree = true;
nixpkgs.config.nvidia.acceptLicense = true; nixpkgs.config.nvidia.acceptLicense = true;
} }
+4 -1
View File
@@ -5,7 +5,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz"; home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-26.05.tar.gz";
in in
{ {
@@ -24,6 +24,7 @@ in
./incus.nix ./incus.nix
./drives.nix ./drives.nix
./prometheus.nix ./prometheus.nix
#./ollama.nix
#./cron.nix #./cron.nix
#./auto-upgrade.nix #./auto-upgrade.nix
]; ];
@@ -35,5 +36,7 @@ in
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
documentation.enable = false;
} }
+5 -1
View File
@@ -18,7 +18,11 @@
helix # Very bazed terminal editor helix # Very bazed terminal editor
broot # Very bazed terminal file explorer broot # Very bazed terminal file explorer
tcpdump tcpdump
python3
python312
python312Packages.pip
python312Packages.virtualenv
ffmpeg
]; ];
} }