final touches upgrade 24.11
Some checks failed
Nix Format Check / check-format (push) Has been cancelled

This commit is contained in:
2024-12-09 16:02:05 +01:00
parent 2c0e3c746b
commit a4871ba423
12 changed files with 102 additions and 49 deletions

View File

@@ -19,7 +19,7 @@
# Enable Vulkan support for AMD graphics cards
hardware.graphics.extraPackages32 = with pkgs.pkgsi686Linux; [ amdvlk ];
# Enable OpenGL
# Enable graphics
hardware.graphics = {
enable = true;

View File

@@ -9,50 +9,62 @@
imports = [ /etc/nixos/hardware-configuration.nix ];
networking.hostName = "mennos-laptop";
# Bootloader.
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enable OpenGL
hardware.graphics.enable = true;
# Enable graphics
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
amdvlk
rocmPackages.clr
];
};
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = [ "nvidia" ];
# Load AMD and NVIDIA drivers for Xorg and Wayland
services.xserver.videoDrivers = [
"nvidia"
"amdgpu"
];
# nvtop, a system monitor for GPUs
# Monitoring tools
environment.systemPackages = with pkgs; [
nvtopPackages.nvidia
nvtopPackages.amd
glxinfo
vulkan-tools
];
hardware.nvidia = {
# Modesetting is required.
# Enable modesetting
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;
# Power management configuration
powerManagement = {
enable = true;
finegrained = false; # Disabled as it requires offload mode
};
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Prime configuration for hybrid graphics
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
# AMD GPU as primary
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
boot.kernelParams = [
"amdgpu.sg_display=0"
"nvidia-drm.modeset=1"
];
}

View File

@@ -24,7 +24,7 @@
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = [ "nvidia" ];
# Enable OpenGL
# Enable graphics
hardware.graphics.enable = true;
# nvtop, a system monitor for GPUs