Cannot Install legacy GPU driver in 26.05

Hello, I am relatively new to nixos. I have been using it for a few months.

My computer has an nvidia GTX 980, and I followed this guide https://nixos.wiki/wiki/Nvidia?__cf_chl_f_tk=eigtlMfFkZFxQT7iuPsQga_NmCnZXU4wkeaCEAyEwNw-1782954335-1.0.1.1-LDIGX9c2pS2aOm1jz2y.28L1mqZYw6T7WAyIM4Rq6p0 in 25.11 to get my card working. None of the options for legacy driver seemed to be able to build, so I commented out the final line that specified the driver to use. It seemed to be able to select the correct driver when I rebuilt it (legacy_580), but if I manually entered legacy_580, the build would fail due to a “missing dependency.” When I tried to upgrade to 26.05, this problem reappeared, although I was able to rebuild-switch the system. However, upon reboot, the graphics driver failed to load and I was stuck in text only. I tried to manually put in the correct driver, but same as before, it could not rebuild the system if I manually specified the driver. None of the options listed in the link above work. I tried switching between open and closed drivers as well.

Can you share the full configuration you’ve ended up with? It’s way easier to tell you which options to change than play whack-a-mole with what you may or may not have picked up from the internet.

It’d also be nice to know:

  • Which DE/WM you use
  • Whether you use its wayland session, if it has a choice
  • Whether you also have an iGPU
    • Whether you care for using said iGPU

The nvidia situation is honestly awful. Pretty much all documentation you’ll find is just the latest iteration of a cargo cult, almost nobody actually reads or understands the upstream nvidia documentation. Even if you find something “correct”, your desired hardware/software will probably differ enough that whatever they did doesn’t apply to your use case, because nvidia make awful drivers. Hell, I’d argue you should not even use the NixOS module, but I can at least help you work around its quirks if you tell me what you’re working with.

1 Like

Sorry for the lack of info. I’m using KDE with wayland. I also have the option to use X11, but I mainly use wayland. My friend was helping me sort through some of the info, and it seems like up to this point I’ve been using the generic version of the nvidia driver (580.142), although strangely, now after trying to rebuild into 26.05, my old config file with 25.11 can no longer rebuild with the generic driver.

I do not care about the integrated graphics. I don’t quite know why it can’t rebuild now since the computer is currently working and I can even open games with it, but if I try to rebuild it fails.

Sorry, I tried to add my configuration file, but I cant add a text file so it formats really strangely.

Surround the file with triple backticks to get a codeblock. Like so:

\```
# configuration.nix
{
  # ...
\```

Except without the \, markdown doesn’t escape triple backslashes for tutorial purposes well.

1 Like
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      /etc/nixos/hardware-configuration.nix
    ];

  # Bootloader.
  boot.loader.grub.enable = true;
  boot.loader.grub.device = "/dev/sda";
  boot.loader.grub.useOSProber = true;

  # Use latest kernel.
  boot.kernelPackages = pkgs.linuxPackages_latest;

  networking.hostName = "nixos"; # 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/Denver";

  # 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 the X11 windowing system.
  # You can disable this if you're only using the Wayland session.
  services.xserver.enable = true;

  # Enable the KDE Plasma Desktop Environment.
  services.displayManager.sddm.enable = true;
  services.desktopManager.plasma6.enable = true;

  # Configure keymap in X11
  services.xserver.xkb = {
    layout = "us";
    variant = "";
  };

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound with pipewire.
  services.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.zach = {
    isNormalUser = true;
    description = "zach";
    extraGroups = [ "networkmanager" "wheel" "dialout" ];
    packages = with pkgs; [
      kdePackages.kate
    #  thunderbird
    ];
  };


	#Enable NIX flakes
	nix.settings.experimental-features = [ "nix-command" "flakes" ];

  #ENABLE GIT
	programs.git.enable = true;

  # Install firefox.
  programs.firefox.enable = true;

  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;

			# Enable OpenGL
  hardware.graphics = {
    enable = true;
  };

  # Load nvidia driver for Xorg and Wayland
  services.xserver.videoDrivers = ["nvidia"];

  hardware.nvidia = {

    # Modesetting is required.
    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;

    # 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;

    # 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+
    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.legacy_535;
  };

	nixpkgs.config.nvidia.acceptLicense = true;


	#enable steam
	programs.steam.enable = true;
  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
  #  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  #  wget

	(python3.withPackages (python-pkgs: with python-pkgs; [
        pip
        ]))
	pkgs.krita
	pkgs.steam
 	pkgs.vlc
	pkgs.libreoffice
	pkgs.element-web
	pkgs.discord
	pkgs.geeqie
	pkgs.kicad
	pkgs.obs-studio
	pkgs.openscad
	pkgs.mumble
	pkgs.bluez
	pkgs.element-desktop
	pkgs.keepass
	pkgs.dosbox-x
	pkgs.feh
	pkgs.hyprland
	pkgs.mullvad-vpn
	pkgs.tinyxxd
	pkgs.photoqt
	pkgs.game-devices-udev-rules
	pkgs.minicom
	pkgs.arduino-ide
	pkgs.dasm
	#pkgs.libvibrant
	#pkgs.vibrantlinux
	pkgs.thunderbird
	pkgs.diskscan
	  ];

fonts.packages = with pkgs; [ #add fonts here.
	komika-fonts
	];

services = {
  udev = {
    packages = with pkgs; [
      game-devices-udev-rules
    ];
  };
};
services.mullvad-vpn.enable = true;

	#nvidia attempt 2
	# services.xserver.videoDrivers = [ "nvidia" ];

hardware.bluetooth = {
  enable = true;
  powerOnBoot = true;
  settings = {
    General = {
      # Shows battery charge of connected devices on supported
      # Bluetooth adapters. Defaults to 'false'.
      Experimental = true;
      # When enabled other devices can connect faster to us, however
      # the tradeoff is increased power consumption. Defaults to
      # 'false'.
      FastConnectable = false;
    };
    Policy = {
      AutoEnable = true;
    };
  };
};




  # 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 = "25.11"; # Did you read the comment?

}```

Sorry, I’m really tired and misread “backticks” as “brackets”

Would you also share the whole error message please?

I now had time to look at your config. First of all, you were reading the outdated community wiki, the official wiki is at wiki.nixos.org: NVIDIA - Official NixOS Wiki . Unfortunately the owner is uncooperative and the domain still scores high in search engines, so the confusion can’t be easily fixed.

The official wiki correctly shows which driver package you need to use, but there also is a shorter version now through the branch option:

hardware.nvidia.branch = "legacy_580";

With this driver, your system should build and run correctly.

1 Like

Not quite. The kernel version will get in the way, so the build will fail. Even if that was resolved, it might still be stuck using an iGPU, and sleep won’t work.

The configuration as-is is very broken, as are all nvidia configurations I see on this discourse. If you’re not telling a newbie to completely delete everything nvidia-related you’re probably doing it wrong. Please don’t help spread the cargo cult.


So let’s do that! Firstly, delete this line:

If you use the latest kernel, you will attempt to use nvidia drivers that weren’t designed for it with it. Since the nvidia driver is a kernel module, and it is hence part of the kernel code and has full control over everything, this can lead to anything from simple build failures to spontaneously combusting hardware.

If you use the nvidia driver, just stick to LTS kernels.

Next up, delete the entire hardware.nvidia block, and replace it with:

{
  hardware.nvidia = {
    # GTX 980
    branch = "legacy_580";
    open = false;

    # Store full graphics memory on suspend
    powerManagement.enable = true;
  };
}

… and nothing else.


Finally:

Does this mean you have an iGPU, but don’t want to use it? If so, we’ll have to do more work, because as-is plasma will likely use your iGPU by default.

1 Like

Okay, I edited so my config file looks like this:

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      /etc/nixos/hardware-configuration.nix
    ];

  # Bootloader.
  boot.loader.grub.enable = true;
  boot.loader.grub.device = "/dev/sda";
  boot.loader.grub.useOSProber = true;

  networking.hostName = "nixos"; # 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/Denver";

  # 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 the X11 windowing system.
  # You can disable this if you're only using the Wayland session.
  services.xserver.enable = true;

  # Enable the KDE Plasma Desktop Environment.
  services.displayManager.sddm.enable = true;
  services.desktopManager.plasma6.enable = true;

  # Configure keymap in X11
  services.xserver.xkb = {
    layout = "us";
    variant = "";
  };

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound with pipewire.
  services.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.zach = {
    isNormalUser = true;
    description = "zach";
    extraGroups = [ "networkmanager" "wheel" "dialout" ];
    packages = with pkgs; [
      kdePackages.kate
    #  thunderbird
    ];
  };


	#Enable NIX flakes
	nix.settings.experimental-features = [ "nix-command" "flakes" ];
  
  #ENABLE GIT
	programs.git.enable = true;

  # Install firefox.
  programs.firefox.enable = true;

  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;


	# Enable OpenGL
  hardware.graphics = {
    enable = true;
  };

  # Load nvidia driver for Xorg and Wayland
  services.xserver.videoDrivers = ["nvidia"];

	hardware.nvidia = {
	#gtx980
	nvidia.branch = "legacy_580";
	open = false;

	# Store full graphics memory on suspend
	pwoerManagement.enable = true;
	};

	nixpkgs.config.nvidia.acceptLicense = true;


	#enable steam
	programs.steam.enable = true;
  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
  #  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  #  wget

	(python3.withPackages (python-pkgs: with python-pkgs; [
        pip
        ]))
	pkgs.krita
	pkgs.steam
 	pkgs.vlc
	pkgs.libreoffice
	pkgs.element-web
	pkgs.discord
	pkgs.geeqie
	pkgs.kicad
	pkgs.obs-studio
	pkgs.openscad
	pkgs.mumble
	pkgs.bluez	
	pkgs.element-desktop
	pkgs.keepass
	pkgs.dosbox-x
	pkgs.feh	
	pkgs.hyprland
	pkgs.mullvad-vpn	
	pkgs.tinyxxd
	pkgs.photoqt
	pkgs.game-devices-udev-rules
	pkgs.minicom
	pkgs.arduino-ide
	pkgs.dasm	
	#pkgs.libvibrant
	#pkgs.vibrantlinux
	pkgs.thunderbird
	pkgs.diskscan
	  ];

fonts.packages = with pkgs; [ #add fonts here.
	komika-fonts
	];

services = {
  udev = {
    packages = with pkgs; [
      game-devices-udev-rules
    ];
  };
};
services.mullvad-vpn.enable = true;

	#nvidia attempt 2
	# services.xserver.videoDrivers = [ "nvidia" ]; 

hardware.bluetooth = {
  enable = true;
  powerOnBoot = true;
  settings = {
    General = {
      # Shows battery charge of connected devices on supported
      # Bluetooth adapters. Defaults to 'false'.
      Experimental = true;
      # When enabled other devices can connect faster to us, however
      # the tradeoff is increased power consumption. Defaults to
      # 'false'.
      FastConnectable = false;
    };
    Policy = {
      AutoEnable = true;
    };
  };
};




  # 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 = "25.11"; # Did you read the comment?

}

Now I’m getting this error:

[zach@nixos:~]$ sudo nixos-rebuild switch
error:
       … while evaluating the attribute 'config'
         at /nix/store/l7wvb6rqjjxidjdk9yv9p1a075lvjhq9-nixos-25.11/nixos/lib/modules.nix:361:9:
          360|         options = checked options;
          361|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          362|         _module = checked (config._module);

       … while calling the 'seq' builtin
         at /nix/store/l7wvb6rqjjxidjdk9yv9p1a075lvjhq9-nixos-25.11/nixos/lib/modules.nix:361:18:
          360|         options = checked options;
          361|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          362|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `hardware.nvidia.nvidia' does not exist. Definition values:
       - In `/home/zach/git/configuration.nix':
           {
             branch = "legacy_580";
           }
Command 'nix-build '<nixpkgs/nixos>' --attr config.system.build.nixos-rebuild --no-out-link' returned non-zero exit status 1.```

I changed the nvidia.branch = “legacy_580” line to
branch = “legacy_580” and it was able to rebuild. I’m checking if things are working.

1 Like

Okay! It seems to be working now. I am able to rebuild the configuration.nix file and I quickly booted up a game that would not run well on integrated graphics and it seems to be running as expected. My computer is a desktop, so I imagine a laptop might have more issues with the integrated graphics.

This is the configuration.nix file that worked:

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      /etc/nixos/hardware-configuration.nix
    ];

  # Bootloader.
  boot.loader.grub.enable = true;
  boot.loader.grub.device = "/dev/sda";
  boot.loader.grub.useOSProber = true;

  networking.hostName = "nixos"; # 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/Denver";

  # 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 the X11 windowing system.
  # You can disable this if you're only using the Wayland session.
  services.xserver.enable = true;

  # Enable the KDE Plasma Desktop Environment.
  services.displayManager.sddm.enable = true;
  services.desktopManager.plasma6.enable = true;

  # Configure keymap in X11
  services.xserver.xkb = {
    layout = "us";
    variant = "";
  };

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound with pipewire.
  services.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.zach = {
    isNormalUser = true;
    description = "zach";
    extraGroups = [ "networkmanager" "wheel" "dialout" ];
    packages = with pkgs; [
      kdePackages.kate
    #  thunderbird
    ];
  };


	#Enable NIX flakes
	nix.settings.experimental-features = [ "nix-command" "flakes" ];
  
  #ENABLE GIT
	programs.git.enable = true;

  # Install firefox.
  programs.firefox.enable = true;

  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;


	# Enable OpenGL
  hardware.graphics = {
    enable = true;
  };

  # Load nvidia driver for Xorg and Wayland
  services.xserver.videoDrivers = ["nvidia"];

	hardware.nvidia = {
	#gtx980
	branch = "legacy_580";
	open = false;

	# Store full graphics memory on suspend
	powerManagement.enable = true;
	};

	nixpkgs.config.nvidia.acceptLicense = true;


	#enable steam
	programs.steam.enable = true;
  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
  #  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  #  wget

	(python3.withPackages (python-pkgs: with python-pkgs; [
        pip
        ]))
	pkgs.krita
	pkgs.steam
 	pkgs.vlc
	pkgs.libreoffice
	pkgs.element-web
	pkgs.discord
	pkgs.geeqie
	pkgs.kicad
	pkgs.obs-studio
	pkgs.openscad
	pkgs.mumble
	pkgs.bluez	
	pkgs.element-desktop
	pkgs.keepass
	pkgs.dosbox-x
	pkgs.feh	
	pkgs.hyprland
	pkgs.mullvad-vpn	
	pkgs.tinyxxd
	pkgs.photoqt
	pkgs.game-devices-udev-rules
	pkgs.minicom
	pkgs.arduino-ide
	pkgs.dasm	
	#pkgs.libvibrant
	#pkgs.vibrantlinux
	pkgs.thunderbird
	pkgs.diskscan
	  ];

fonts.packages = with pkgs; [ #add fonts here.
	komika-fonts
	];

services = {
  udev = {
    packages = with pkgs; [
      game-devices-udev-rules
    ];
  };
};
services.mullvad-vpn.enable = true;

	#nvidia attempt 2
	# services.xserver.videoDrivers = [ "nvidia" ]; 

hardware.bluetooth = {
  enable = true;
  powerOnBoot = true;
  settings = {
    General = {
      # Shows battery charge of connected devices on supported
      # Bluetooth adapters. Defaults to 'false'.
      Experimental = true;
      # When enabled other devices can connect faster to us, however
      # the tradeoff is increased power consumption. Defaults to
      # 'false'.
      FastConnectable = false;
    };
    Policy = {
      AutoEnable = true;
    };
  };
};




  # 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 = "25.11"; # Did you read the comment?

}

Thank you so much for your help!!!

2 Likes

A better way to verify is to run nvidia-smi and see which applications run on your dGPU.

Plasma has auto-detection that automatically offloads intensive applications, but the heuristics might not always work, and depending on how the displays are hooked up you might still be running the DE on your iGPU and pay a penalty because your GPUs have to hand over memory. Plus, there’s always the chance firmware chooses a different GPU one day for some reason.

It’d be pretty simple to make the selection permanent via configuration. Or you can even check if you can disable the iGPU in BIOS.

2 Likes

Here’s what I got from that:

Thu Jul  2 12:15:53 2026       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.142                Driver Version: 580.142        CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 980         Off |   00000000:01:00.0  On |                  N/A |
| 33%   62C    P0            177W /  180W |    1433MiB /   4096MiB |     99%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            1409      G   ...s-kwin-6.6.5/bin/kwin_wayland         44MiB |
|    0   N/A  N/A            1471      G   ...urrent-system/sw/bin/Xwayland          1MiB |
|    0   N/A  N/A            1516      G   ...rkspace-6.6.5/bin/plasmashell          1MiB |
|    0   N/A  N/A            2382      G   ...share/Steam/ubuntu12_32/steam          3MiB |
|    0   N/A  N/A            2628      G   ./steamwebhelper                         34MiB |
|    0   N/A  N/A            2666    C+G   ...am/ubuntu12_64/steamwebhelper          3MiB |
|    0   N/A  N/A            2751      G   ...current-system/sw/bin/firefox        146MiB |
|    0   N/A  N/A            4933      G   C:\windows\system32\explorer.exe          1MiB |
|    0   N/A  N/A            4958    C+G   S:\common\PEAK\PEAK.exe                1064MiB |
|    0   N/A  N/A            5084      G   /run/current-system/sw/bin/krita         46MiB |
+-----------------------------------------------------------------------------------------+

Looks like everything’s indeed running on the dGPU. If you ever notice weird slowdowns, you know where to find me.

Thank you so much for all the help!