Added nvidia.nix

This commit is contained in:
2024-09-06 19:44:05 +02:00
parent f676928197
commit ef3c24b031
2 changed files with 20 additions and 16 deletions

View File

@@ -1,9 +1,10 @@
{ config, pkgs, stylix, ... }: { config, pkgs, ... }:
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./modules/nvidia.nix
./modules/services.nix ./modules/services.nix
./modules/styling.nix ./modules/styling.nix
]; ];
@@ -35,21 +36,6 @@
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true; hardware.bluetooth.powerOnBoot = true;
hardware.nvidia = {
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
open = true;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
time.timeZone = "Europe/Rome"; time.timeZone = "Europe/Rome";
# Select internationalisation properties. # Select internationalisation properties.
@@ -102,6 +88,7 @@
tree tree
unzip unzip
wget wget
wl-clipboard
zip zip
zoxide zoxide
zulu zulu

17
modules/nvidia.nix Normal file
View File

@@ -0,0 +1,17 @@
{ config, ... }:
{
hardware.nvidia = {
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
open = true;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}