extract nvidia to own module
This commit is contained in:
parent
20f1e45acd
commit
437c8ae1eb
@ -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; };
|
||||
|
@ -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;
|
||||
};
|
||||
|
22
modules/nvidia/default.nix
Normal file
22
modules/nvidia/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
|
@ -5,8 +5,9 @@
|
||||
../hardware-configuration.nix
|
||||
./laptop
|
||||
modules.dnscrypt
|
||||
modules.gaming
|
||||
# modules.wireguard
|
||||
# modules.gaming
|
||||
# modules.nvidia
|
||||
hosts.nixosModule
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user