extract nvidia to own module

This commit is contained in:
Ivan Dimitrov 2023-11-19 16:19:51 +02:00
parent 20f1e45acd
commit 437c8ae1eb
4 changed files with 25 additions and 16 deletions

View File

@ -1,6 +1,7 @@
{ system, nixpkgs, pkgs, ide, ... }:
{
gaming = import ./gaming { inherit nixpkgs; };
nvidia = import ./nvidia { inherit nixpkgs; };
dnscrypt = import ./dnscrypt;
wireguard = import ./wireguard;
packages = import ./packages { inherit pkgs; };

View File

@ -3,26 +3,11 @@
# Uses unfree shit
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"nvidia-settings"
"nvidia-x11"
"nvidia-persistenced"
"steam"
"steamcmd"
"steam-original"
"steam-run"
];
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;
};
programs.steam = {
enable = true;
};

View File

@ -0,0 +1,22 @@
{ nixpkgs, ... }:
{
# Uses unfree shit
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (nixpkgs.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

@ -5,8 +5,9 @@
../hardware-configuration.nix
./laptop
modules.dnscrypt
modules.gaming
# modules.wireguard
# modules.gaming
# modules.nvidia
hosts.nixosModule
];
};