add the nvidia and steam configurations for mlg

This commit is contained in:
randomuser 2023-08-03 14:32:53 -05:00
parent 0677189e4f
commit 33a01619cf
3 changed files with 28 additions and 1 deletions

View File

@ -5,7 +5,7 @@
../common/desktop.nix
../common/steam.nix
../common/minecraft.nix
# ../common/nvidia.nix
../common/nvidia.nix
];
boot.loader = {

View File

@ -7,6 +7,10 @@
driSupport32Bit = true;
};
environment.systemPackages = with pkgs; [
glxinfo
];
# Tell Xorg to use the nvidia driver (also valid for Wayland)
services.xserver.videoDrivers = ["nvidia"];
@ -24,5 +28,15 @@
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}

13
common/steam.nix Normal file
View File

@ -0,0 +1,13 @@
{ lib, config, pkgs, ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
environment.systemPackages = with pkgs; [
steam-run
];
}