NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.01k stars 13.36k forks source link

gnome3 not found when upgrading from 18.03 to 18.09 #46818

Closed candeira closed 5 years ago

candeira commented 5 years ago

Issue description

Error says gnome3 Desktop Manager is not found when trying to upgrade from 18.03 to 18.09.

Steps to reproduce

[root@desire:/etc/nixos]# nix-channel --update nixos unpacking channels...

[root@desire:/etc/nixos]# nixos-rebuild switch building Nix... building the system configuration... trace: Default desktop manager (gnome3) not found at evaluation time. These are the known valid session names: services.xserver.desktopManager.default = "xterm"; services.xserver.desktopManager.default = "none"; It's also possible the default can be found in one of these packages: gnome-session-3.28.1


## Technical details

[root@desire:/etc/nixos]# nix-shell -p nix-info --run "nix-info -m"

The relevant part of /etc/nixos/configuration.nix:

  # Enable the X11 windowing system.
  services.xserver = {
    enable = true;
    layout = "us";
    # xkbOptions = "eurosign:e";

    # Use GDM to login and switch between Gnome and XMonad
    displayManager.gdm.enable = true;

    # Enable the KDE Desktop Environment.
    # services.xserver.displayManager.sddm.enable = true;
    # services.xserver.desktopManager.plasma5.enable = true;
    # Or Gnome...
    desktopManager = {
      gnome3.enable = true;
      default = "gnome3";
    };

    # Enable XMonad Desktop Environment
    windowManager.xmonad = {
      enable = true;
      enableContribAndExtras = true;
      extraPackages = haskellPackages: [
        haskellPackages.xmonad-contrib
        haskellPackages.xmonad-extras
        haskellPackages.xmonad
      ];
    };
    windowManager.default = "xmonad";

    # Trackpad just in case, while I make trackpoint work
    synaptics = {
      enable = true;
      minSpeed = "0.8";
      maxSpeed = "1.4";
      accelFactor = "0.05";
      tapButtons = false;
      twoFingerScroll = true;
    };

    # Incompatible with Synaptics
    libinput.enable = false;
  };
hedning commented 5 years ago

It's a warning (trace) not an error, but that's obviously not very clear (my bad), so installing and then running gnome should work fine. Introduced in this PR https://github.com/NixOS/nixpkgs/pull/43992 where we've moved away from making a custom session file in favor of using what upstream offers.

@jtojnar suggests a fix to eliminate the warning here which we should probably do (and backport to 18.09).

hedning commented 5 years ago

GDM ignores desktopManager.default at the moment btw. Fixing this might be doable, but would probably involve quite a bit of work. Warning about this would be good, but I don't think it's easy to check if desktopManager.default have been explicitly set by the user.

So for now it's better to not specify desktopManager.default when using GDM, that should remove the warning. GDM will pick the gnome sesssion by default I believe and will definitely remember your last session choice.

candeira commented 5 years ago

Oh, thanks. I'll try an update now.