I am running NixOS on my Dell Precision 5530 with a Nvidia Quadro P1000. I followed this guide (Nvidia - NixOS Wiki) to set up my GPU with PRIME Sync. My GPU will work completely fine on Xorg but is simply not used on Wayland. I have tried using elements of the configuration in this repo (nixos-hardware/dell/precision/5530 at master · NixOS/nixos-hardware · GitHub) as well as importing the whole thing as suggested but I have not had any luck. I also have tried the Nouveau drivers without any success. I am relatively new to Nix OS so any suggestions are very appreciated. Bellow are my configuration.nix and hardware-configuration.nix files:
{ config, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
kernelParams = [
# fix lspci hanging with nouveau
# source https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803179/comments/149
"acpi_rev_override=1"
"acpi_osi=Linux"
"nouveau.modeset=0"
"pcie_aspm=force"
"drm.vblankoffdelay=1"
"nouveau.runpm=0"
"mem_sleep_default=deep"
# fix flicker
# source https://wiki.archlinux.org/index.php/Intel_graphics#Screen_flickering
"i915.enable_psr=0"
"nvidia_drm.modeset=1"
];
};
services.xserver = {
enable = true;
# Load nvidia driver for Xorg and Wayland
videoDrivers = ["nvidia"];
# Enable the GNOME Desktop Environment.
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
# Configure keymap in X11
xkb = {
layout = "us";
variant = "";
};
};
hardware = {
nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = lib.mkDefault config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
offload.enable = false;
reverseSync.enable = false;
sync.enable = true;
# Enable if using an external GPU
allowExternalGpu = false;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
};
services = {
#From precision 5530 configeration on github
fwupd.enable = lib.mkDefault true;
thermald.enable = lib.mkDefault true;
};
networking.hostName = "HP-Printer"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = [ pkgs.epson-escpr ];
};
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.andrewh = {
isNormalUser = true;
description = "Andrew Heuer";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
# thunderbird
];
};
programs = {
firefox.enable = true;
direnv.enable = true;
steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nixpkgs.config.cudoSupport = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
#General
libreoffice-still
google-chrome
# Code
vscode
eclipses.eclipse-sdk
git
# GameDev
unityhub
blender
# Messageing
discord
# Games
sidequest
# Tools
wget
usbimager
openvpn
lshw
nvtopPackages.full
# Misc
logisim
];
nix.settings.auto-optimise-store = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d --keep 3";
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}
# 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 = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/39c3dbb8-d8a6-41e2-ba1b-738c97c9610a";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/BBF5-13B5";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp59s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
I am not currently using home manager or flakes.