configuration.nix/modules/gaming.nix

36 lines
653 B
Nix
Raw Normal View History

2023-10-15 07:46:48 +02:00
{ config, lib, pkgs, ... }:
{
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"nvidia-settings"
"nvidia-x11"
"nvidia-persistenced"
2023-11-06 07:57:35 +01:00
"steam"
"steamcmd"
"steam-original"
"steam-run"
2023-10-15 07:46:48 +02:00
];
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
prime = {
sync.enable = true;
nvidiaBusId = "PCI:1:0:0";
intelBusId = "PCI:0:2:0";
};
modesetting.enable = true;
nvidiaSettings = true;
};
2023-11-06 07:57:35 +01:00
programs.steam = {
enable = true;
};
environment = {
systemPackages = with pkgs; [
steamcmd
steam-tui
];
};
2023-10-15 07:46:48 +02:00
}