From 1322951863b43518ad73bfcbbe10611bf53be82b Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Tue, 2 Sep 2025 12:54:19 -0400 Subject: [PATCH] nvidia --- hosts/nixos/Dragneel/default.nix | 3 +++ .../nixos/Dragneel/hardware-configuration.nix | 23 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 hosts/nixos/Dragneel/hardware-configuration.nix diff --git a/hosts/nixos/Dragneel/default.nix b/hosts/nixos/Dragneel/default.nix index 4e84461..ab63ace 100644 --- a/hosts/nixos/Dragneel/default.nix +++ b/hosts/nixos/Dragneel/default.nix @@ -10,6 +10,9 @@ ... }: { imports = lib.flatten [ + # Hardware + ./hardware-configuration.nix # I want to use factor if possible + # Disks inputs.disko.nixosModules.disko (lib.custom.relativeToRoot "hosts/common/disks/btrfs-disk.nix") diff --git a/hosts/nixos/Dragneel/hardware-configuration.nix b/hosts/nixos/Dragneel/hardware-configuration.nix new file mode 100644 index 0000000..eccc551 --- /dev/null +++ b/hosts/nixos/Dragneel/hardware-configuration.nix @@ -0,0 +1,23 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = ["sg" "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + hardware.graphics.enable = true; + services.xerver.videoDrivers = ["nvidia"]; + hardware.nvidia.open = true; +}