8000 `services.xserver` naming is confusing · Issue #94799 · NixOS/nixpkgs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

services.xserver naming is confusing #94799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
piegamesde opened this issue Aug 6, 2020 · 14 comments
Open

services.xserver naming is confusing #94799

piegamesde opened this issue Aug 6, 2020 · 14 comments
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@piegamesde
Copy link
Member

From the man page:

The X Window System (X11) provides the basis of NixOS’ graphical user interface. It can be enabled as follows:

services.xserver.enable = true;

From the default generated configuration.nix:

# Enable the X11 windowing system.
services.xserver.enable = true;

The file is also located in nixos/modules/services/x11/xserver.nix

BUT

I need to set services.xserver.enable = true, even though I use Gnome on Wayland without any X11 running. The name xserver and its relation to the X11 configuration is really misleading

Additional context

I was wondering why my GUI wasn't showing up until I found out that I must set services.xserver.enable = true;.

Notify maintainers

Didn't find any.

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.4.54, NixOS, 20.03.2685.977000f149b (Markhor)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.6
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module: `services.xserver`
@piegamesde piegamesde added the 0.kind: bug Something is broken label Aug 6, 2020
@worldofpeace
Copy link
Contributor
worldofpeace commented Aug 10, 2020

I'm not really sure if there's a suggestion to a solution here? services.xserver.enable is a perfectly correct naming for enabling xserver, and 99% of the desktop-managers still need xserver, excluding gnome which has a wayland and a xorg session.

(Note, we still don't even have plasma5 with its wayland session yet 😦 )

Is it that you believed gnome to be a wayland only environment, and were confused that you had to enable xserver?
I can understand that assumption even if it didn't turn out to be true.

So I don't think we can do away with services.xserver.*, but I think there should be another namespace to cater to wayland only environments.

@piegamesde
Copy link
Member Author

I'm not really sure if there's a suggestion to a solution here?

I'm not suggesting a solution, because I don't think I know enough about the whole situation. One possibility would be to move desktopManager and displayManager out of xserver, maybe into a new attribute (graphical? desktop?).

While 99% of the desktop and window managers still need X, this will obviously shift in the future. I expect existing environments to slowly transition to Wayland and new ones to be built exclusively for Wayland. Thus, collecting them under the xserver attribute (or any single protocol-specific name) will sooner or later lead to confusion.

Is it that you believed gnome to be a wayland only environment, and were confused that you had to enable xserver?

Yes, exactly. I know GDM still uses X but it feels weird nevertheless. And the current documentation about this attribute re-enforces this.

I've now enabled xserver so I'd expect to be able to use all of the other xserver.* options, but most of them should have no effect on a Wayland session.

Another confusion point is that enabling xserver is required for any of the desktop environments to work. From a Nix/module perspective, this is fine and makes perfectly sense. But from an intuition stand point, I'd think enabling Gnome should enable all used components.

@worldofpeace
Copy link
Contributor

Another confusion point is that enabling xserver is required for any of the desktop environments to work. From a Nix/module perspective, this is fine and makes perfectly sense. But from an intuition stand point, I'd think enabling Gnome should enable all used components.

I agree with this as well. It's actually pretty easy to forget to enable xserver when you'd think that would be enabled implicitly.

@veprbl veprbl added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Aug 19, 2020
@stale

This comment was marked as spam.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Feb 15, 2021
@hpfr
Copy link
Contributor
hpfr commented Aug 6, 2021

If you want to use GDM Wayland, you have to enable this option, which also installs programs like xterm. I just ran across this when trying to remove xterm from my GNOME Wayland machines. It definitely seems like there's some room for improvement in what's installed for a pure Wayland machine.

Is xterm even a requirement on X11, for that matter? b7b1f5d

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 6, 2021
@doronbehar
Copy link
Contributor

Duplicate of #102542

@doronbehar doronbehar marked this as a duplicate of #102542 Sep 30, 2021
@stale

This comment was marked as spam.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 18, 2022
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/enabling-x11-still-results-in-wayland/25362/2

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Feb 10, 2023
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/chroot-23-11-within-22-11-bare-metal-because-nvidia/37283/35

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-config-shows-x11-but-i-am-running-wayland-what-is-going-on/42090/2

@jtojnar jtojnar mentioned this issue Mar 27, 2024
27 tasks
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/diary-of-a-new-nixos-user-thoughts-impressions-obstacles/47637/5

@SuperSandro2000
Copy link
Member

In the last stable release cycle the plasma 6 people including me put a lot of effort into making plasma 6 as xserver options free as possible. There are a few small leftovers but I think this issue is mostly solved.

If no one disagrees I think we can close this issue.

@name-snrl
Copy link
Contributor

plasma 6

Yes, but what about GNOME, which I know is also a wayland DE by default? It's still in services.xserver.desktopManager. I mean, it seems like this is a broader issue

p.s. Thank a lot for your work on KDE

@nikolayli
Copy link

Decided to switch from Arch to NixOS (why not). I write in the configuration file (not sure of the syntax) (2 days on NixOS):

programs.sway = {
    enable = true;
    wrapperFeatures.gtk = true;
};

Naturally, Sway does not start. I decide to put WM or DE on X11, having commented out the line:

# Enable the X11 windowing system.
services.xserver.enable = true;

But surprisingly, Sway starts.

[niko@nixos:~]$ echo $XDG_SESSION_TYPE
wayland

Yes, we realize that sometimes we have dependencies in Wayland on X. But the choice of the name and especially the comment on this line is horrible. How? How is a person supposed to figure this out by having in the configuration file?

# Enable the X11 windowing system.
services.xserver.enable = true;

Perhaps the bare minimum is to do at least this:

# Enable the X11 and/or Wayland windowing system.
services.xserver.enable = true;

Of course this is not a solution to the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

No branches or pull reque 3948 sts

9 participants
0