NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.73k stars 13.16k forks source link

Gnome3 and Pantheon in the same system does not build #64611

Open romildo opened 5 years ago

romildo commented 5 years ago

Issue description

I want to have gnome3 and pantheon desktop managers in the same NixOS system, so that the user can choose the desired one at login time. So I have on configuration.nix:

  services.xserver.desktopManager.pantheon.enable = true;
  services.xserver.desktopManager.gnome3.enable = true;

But nixos-rebuild gives the following error:

error: The unique option `networking.networkmanager.basePackages.modemmanager' is defined multiple times, in:
 - /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/x11/desktop-managers/pantheon.nix
 - /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/x11/desktop-managers/gnome3.nix.
(use '--show-trace' to show detailed location information)

cc @worldofpeace

Technical details

worldofpeace commented 5 years ago

Currently there's a bit of work to be done so that both these session can exist on a system without conflicting with each other and making a session unusable.

At first something like

diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix
index ef6820d3326..9e8482432b4 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -206,7 +206,7 @@ in {
       isSystem = true;
     };

-    environment.variables.GNOME_SESSION_DEBUG = optionalString cfg.debug "1";
+    environment.variables.GNOME_SESSION_DEBUG = mkIf cfg.debug "1";

     # Override default mimeapps
     environment.variables.XDG_DATA_DIRS = [ "${mimeAppsList}/share" ];
@@ -228,7 +228,7 @@ in {
     ];

     # Use the correct gnome3 packageSet
-    networking.networkmanager.basePackages =
+    networking.networkmanager.basePackages = mkDefault
       { inherit (pkgs) networkmanager modemmanager wpa_supplicant;
         inherit (pkgs.gnome3) networkmanager-openvpn networkmanager-vpnc
                               networkmanager-openconnect networkmanager-fortisslvpn

would need to be done so they'd at least build.

From there we'd probably have to eliminate having to set NIX_GSETTINGS_OVERRIDES_DIR and use #54150. Then make them not conflict.

wamserma commented 4 years ago

https://github.com/NixOS/nixpkgs/pull/58203 seems also to be related

jtojnar commented 4 years ago

The issues above are fixed but now the conflict occurs in environment.variables.NIX_GSETTINGS_OVERRIDES_DIR. Solution would be https://github.com/NixOS/nixpkgs/issues/54150

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
romildo commented 4 years ago

The issues above are fixed but now the conflict occurs in environment.variables.NIX_GSETTINGS_OVERRIDES_DIR. Solution would be #54150

This is still an issue.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

romildo commented 3 years ago

Still an issue.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

romildo commented 3 years ago

Still an issue.

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info

romildo commented 2 years ago

I marked this as stale due to inactivity. → More info

Not fixed yet.

COLAMAroro commented 1 year ago

I just encountered the same issue with Gnome and Cinnamon, where both can not be enabled at the same time

image

emiellr commented 1 year ago

Still an issue, can't use gdm+gnome3+pantheon. Same problem occurs with gdm+gnome3+deepin.

jtojnar commented 1 year ago

Hopefully, #234615 will allow us to fix this.

rudra-code-creator commented 1 month ago

The issues above are fixed but now the conflict occurs in environment.variables.NIX_GSETTINGS_OVERRIDES_DIR. Solution would be #54150

This is still an issue.

Still an issue in 2024. Facing this issue currently. Hope it gets fixed soon :)

nixos-discourse commented 1 month ago

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

https://discourse.nixos.org/t/help-i-cant-have-pantheon-gnome-and-plasma-installed-on-my-system-at-the-same-time/47346/4

rudra-code-creator commented 1 month ago

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

https://discourse.nixos.org/t/help-i-cant-have-pantheon-gnome-and-plasma-installed-on-my-system-at-the-same-time/47346/4

OMG I started this thread on Discourse!