Installing nvidia drivers on X/i3 also installs Wayland?

Why? Everything seems to be working fine, it’s just very, very annoying knowing that I have both X and Wayland installed now, one of which I’m not using at all…

Relevant config if it matters:

  hardware.opengl = {
      enable = true;
      driSupport = true;
      driSupport32Bit = true;

# Allow unfree packages
  nixpkgs.config.allowUnfree = true;
  nixpkgs.config.allowUnfreePredicate = pkg:
      builtins.elem (lib.getName pkg) [

  services.xserver.videoDrivers = ["nvidia"];

  hardware.nvidia = {
      modesetting.enable = true;

      nvidiaSettings = true;

(yes, the inconsistent indents are bugging me as well but can’t be bothered to care right now…)

You can use nix why-depends to figure out the dependency graphs of specific packages, using /run/current-system as one of the store paths will tell you why a package is installed for the running system.

There’s an equivalent one-liner with the stable CLI too, but I forget it whenever this comes up.

From there you can dig into package definitions and figure out why it’s necessary.

1 Like