helm/modules/hardware/nvidia.nix

15 lines
407 B
Nix
Raw Normal View History

2020-01-14 03:57:36 -08:00
{ config, lib, pkgs, ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true;
# Respect XDG conventions, damn it!
environment.systemPackages = with pkgs; [
(pkgs.writeScriptBin "nvidia-settings" ''
#!${pkgs.stdenv.shell}
exec ${config.boot.kernelPackages.nvidia_x11}/bin/nvidia-settings --config="$XDG_CONFIG_HOME/nvidia/settings"
'')
];
}