From ef3c24b0313f92f53202c90b57efa76062e36ec8 Mon Sep 17 00:00:00 2001 From: Superredstone Date: Fri, 6 Sep 2024 19:44:05 +0200 Subject: [PATCH] Added nvidia.nix --- configuration.nix | 19 +++---------------- modules/nvidia.nix | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 modules/nvidia.nix diff --git a/configuration.nix b/configuration.nix index 670bae8..ba3bb10 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,9 +1,10 @@ -{ config, pkgs, stylix, ... }: +{ config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./modules/nvidia.nix ./modules/services.nix ./modules/styling.nix ]; @@ -35,21 +36,6 @@ hardware.bluetooth.enable = 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"; # Select internationalisation properties. @@ -102,6 +88,7 @@ tree unzip wget + wl-clipboard zip zoxide zulu diff --git a/modules/nvidia.nix b/modules/nvidia.nix new file mode 100644 index 0000000..bca1e84 --- /dev/null +++ b/modules/nvidia.nix @@ -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"; + }; + }; +}