From b6956dd32fbe4bd6a83336a66c3ff73ec47c7b9c Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 11 Sep 2024 00:52:32 -0700 Subject: Bump: i2p --- modules/software/multimedia/video/nvidia.nix | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 modules/software/multimedia/video/nvidia.nix (limited to 'modules/software/multimedia/video/nvidia.nix') diff --git a/modules/software/multimedia/video/nvidia.nix b/modules/software/multimedia/video/nvidia.nix new file mode 100644 index 0000000..bc8cb22 --- /dev/null +++ b/modules/software/multimedia/video/nvidia.nix @@ -0,0 +1,37 @@ +{ pkgs, config, ... }: +{ + environment = { + systemPackages = with pkgs; [ + nvidia-container-toolkit + nvidia-docker + ]; + + shellAliases.nvidia-settings = "nvidia-settings --config='$XDG_CONFIG_HOME'/nvidia/settings"; + }; + + boot = { + blacklistedKernelModules = [ "nouveau" ]; + + kernelParams = [ + "nvidia-drm.fbdev=1" + "nvidia.NVreg_PreserveVideoMemoryAllocations=1" + ]; + }; + + hardware = { + nvidia-container-toolkit.enable = true; + + nvidia = { + modesetting.enable = true; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.production; + forceFullCompositionPipeline = true; + + powerManagement = { + enable = true; + finegrained = false; + }; + }; + }; +} -- cgit v1.2.3