-
Notifications
You must be signed in to change notification settings - Fork 9
/
nvidia.nix
39 lines (34 loc) · 1.04 KB
/
nvidia.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ config, pkgs, lib, ... }:
let
nverStable = config.boot.kernelPackages.nvidiaPackages.stable.version;
nverBeta = config.boot.kernelPackages.nvidiaPackages.beta.version;
nvidiaPackage =
if (lib.versionOlder nverBeta nverStable)
then config.boot.kernelPackages.nvidiaPackages.stable
else config.boot.kernelPackages.nvidiaPackages.beta;
extraEnv = { WLR_NO_HARDWARE_CURSORS = "1"; };
in
{
config = {
home-manager.users.cole = { pkgs, ... }: {
wayland.windowManager.sway = {
extraOptions = [ "--unsupported-gpu" ];
};
};
environment.variables = extraEnv;
environment.sessionVariables = extraEnv;
environment.systemPackages = with pkgs; [
glxinfo
vulkan-tools
glmark2
];
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.package = nvidiaPackage;
hardware.nvidia.powerManagement.enable = false;
services.xserver = {
videoDrivers = [ "nvidia" ];
displayManager.gdm.wayland = true;
displayManager.gdm.nvidiaWayland = true;
};
};
}