helm/modules/hardware/nvidia.nix
2020-01-14 06:58:13 -05:00

15 lines
407 B
Nix

{ 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"
'')
];
}