diff options
| author | Fuwn <[email protected]> | 2024-09-11 00:52:32 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-11 00:52:32 -0700 |
| commit | b6956dd32fbe4bd6a83336a66c3ff73ec47c7b9c (patch) | |
| tree | 5e61c8151b6cde865405d61fb9c1f7bd65c9f662 /modules/software/multimedia/video/nvidia.nix | |
| parent | Bump: swift (diff) | |
| download | nixos-config-b6956dd32fbe4bd6a83336a66c3ff73ec47c7b9c.tar.xz nixos-config-b6956dd32fbe4bd6a83336a66c3ff73ec47c7b9c.zip | |
Bump: i2p
Diffstat (limited to 'modules/software/multimedia/video/nvidia.nix')
| -rw-r--r-- | modules/software/multimedia/video/nvidia.nix | 37 |
1 files changed, 37 insertions, 0 deletions
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; + }; + }; + }; +} |