nvidia proprietary drivers

This commit is contained in:
Ivan Dimitrov 2023-10-15 08:46:48 +03:00
parent 14b5f1f461
commit 8632333fac
3 changed files with 25 additions and 6 deletions

View File

@ -8,6 +8,9 @@
username = "ivand";
homeDirectory = "/home/ivand";
stateVersion = "23.11";
sessionPath = [
"$HOME/.local/bin"
];
pointerCursor = {
name = "Catppuccin-Mocha-Green-Cursors";
package = pkgs.catppuccin-cursors.mochaGreen;

21
modules/nvidia.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
{
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"nvidia-settings"
"nvidia-x11"
"nvidia-persistenced"
];
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;
};
}

View File

@ -1,6 +1,6 @@
{ config, pkgs, ... }: {
imports = [ ../../hardware-configuration.nix ];
imports = [ ../../hardware-configuration.nix ../../modules/nvidia.nix ];
system.stateVersion = "23.11";
@ -15,11 +15,6 @@
};
hardware = {
nvidia = {
modesetting.enable = true;
open = true;
nvidiaSettings = true;
};
opengl = {
enable = true;
driSupport = true;