feat: nvidia stable driver with idle reset, home-manager 26.05, python312 and ffmpeg
This commit is contained in:
1 parent
6e88c6390d
commit
c2c08f7111
3 files changed
+34
-4
No files matched your search
@@ -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;
|
||||
}
|
||||
+4
-1
@@ -5,7 +5,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
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
|
||||
|
||||
{
|
||||
@@ -24,6 +24,7 @@ in
|
||||
./incus.nix
|
||||
./drives.nix
|
||||
./prometheus.nix
|
||||
#./ollama.nix
|
||||
#./cron.nix
|
||||
#./auto-upgrade.nix
|
||||
];
|
||||
@@ -35,5 +36,7 @@ in
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
documentation.enable = false;
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -18,7 +18,11 @@
|
||||
helix # Very bazed terminal editor
|
||||
broot # Very bazed terminal file explorer
|
||||
tcpdump
|
||||
python3
|
||||
|
||||
python312
|
||||
python312Packages.pip
|
||||
python312Packages.virtualenv
|
||||
ffmpeg
|
||||
];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user