52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
# Edit this configuration file to define what should be installed on
|
||
# your system. Help is available in the configuration.nix(5) man page
|
||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||
{ pkgs
|
||
, lib
|
||
, config
|
||
, ...
|
||
}:
|
||
{
|
||
|
||
boot = {
|
||
initrd.kernelModules = [ "i915" ];
|
||
};
|
||
|
||
hardware.nvidia = {
|
||
# modesetting.enable = true;
|
||
# package = pkgs.linuxPackages.nvidia_x11;
|
||
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||
version = "555.58.02";
|
||
|
||
sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM=";
|
||
sha256_aarch64 = lib.fakeSha256;
|
||
openSha256 = lib.fakeSha256;
|
||
settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8=";
|
||
persistencedSha256 = lib.fakeSha256;
|
||
};
|
||
|
||
prime = {
|
||
offload.enable = false;
|
||
sync.enable = true;
|
||
intelBusId = "PCI:0:2:0";
|
||
nvidiaBusId = "PCI:1:0:0";
|
||
};
|
||
};
|
||
|
||
programs.gamemode = {
|
||
enable = true;
|
||
settings = {
|
||
custom = {
|
||
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
||
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
||
};
|
||
};
|
||
};
|
||
|
||
programs.alvr = {
|
||
enable = true;
|
||
openFirewall = true;
|
||
};
|
||
|
||
services.xserver.videoDrivers = [ "nvidia" ];
|
||
}
|