pc added nvidia drivers

This commit is contained in:
Dea 2026-01-09 13:26:43 -05:00
parent 98fcfd2ea1
commit 956f8d47d7
3 changed files with 57 additions and 16 deletions

View file

@ -36,6 +36,7 @@
specialArgs = { inherit inputs; };
modules = [
./hosts/sandalphon/hardware-configuration.nix
./hosts/sandalphon/configuration.nix
]
++ commonModules;
};

View file

@ -1,12 +1,36 @@
{
lib,
inputs,
pkgs,
...
}:
{
networking.hostName = "sandalphon";
networking.hostName = lib.mkDefault "sandalphon";
# nvidia drivers
hardware.graphics = {
enable = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
environment.systemPackages = with pkgs; [
prismlauncher
prismlauncher # minecraft
waywall # mcsr
];
}

View file

@ -1,28 +1,44 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f66916c1-a834-4fb4-9ded-ee04d3650baf";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/f66916c1-a834-4fb4-9ded-ee04d3650baf";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/E474-7CAD";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E474-7CAD";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];