Merge pull request #76985 from Elyhaka/gdm_hides_gnome
gdm: refactor to properly handle wayland sessions
This commit is contained in:
commit
765afd38fa
3 changed files with 24 additions and 3 deletions
|
@ -144,7 +144,7 @@ in
|
|||
services.gnome3.core-shell.enable = true;
|
||||
services.gnome3.core-utilities.enable = mkDefault true;
|
||||
|
||||
services.xserver.displayManager.sessionPackages = [ pkgs.gnome3.gnome-session ];
|
||||
services.xserver.displayManager.sessionPackages = [ pkgs.gnome3.gnome-session.sessions ];
|
||||
|
||||
environment.extraInit = ''
|
||||
${concatMapStrings (p: ''
|
||||
|
@ -249,11 +249,17 @@ in
|
|||
services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
|
||||
services.telepathy.enable = mkDefault true;
|
||||
|
||||
systemd.packages = with pkgs.gnome3; [ vino gnome-session ];
|
||||
systemd.packages = with pkgs.gnome3; [
|
||||
gnome-session
|
||||
gnome-shell
|
||||
vino
|
||||
];
|
||||
|
||||
services.avahi.enable = mkDefault true;
|
||||
|
||||
xdg.portal.extraPortals = [ pkgs.gnome3.gnome-shell ];
|
||||
xdg.portal.extraPortals = [
|
||||
pkgs.gnome3.gnome-shell
|
||||
];
|
||||
|
||||
services.geoclue2.enable = mkDefault true;
|
||||
services.geoclue2.enableDemoAgent = false; # GNOME has its own geoclue agent
|
||||
|
|
|
@ -174,6 +174,10 @@ in
|
|||
"f /run/gdm/.config/gnome-initial-setup-done 0711 gdm gdm - yes"
|
||||
];
|
||||
|
||||
# Otherwise GDM will not be able to start correctly and display Wayland sessions
|
||||
systemd.packages = with pkgs.gnome3; [ gnome-session gnome-shell ];
|
||||
environment.systemPackages = [ pkgs.gnome3.adwaita-icon-theme ];
|
||||
|
||||
systemd.services.display-manager.wants = [
|
||||
# Because sd_login_monitor_new requires /run/systemd/machines
|
||||
"systemd-machined.service"
|
||||
|
|
|
@ -6,6 +6,8 @@ stdenv.mkDerivation rec {
|
|||
pname = "gnome-session";
|
||||
version = "3.34.2";
|
||||
|
||||
outputs = ["out" "sessions"];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gnome-session/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1qgqp97f8k2zi2ydvhds14zsjzfj7cv521r6wx5sw0qacn0p7dwb";
|
||||
|
@ -50,6 +52,15 @@ stdenv.mkDerivation rec {
|
|||
--suffix XDG_CONFIG_DIRS : "${gnome3.gnome-settings-daemon}/etc/xdg"
|
||||
'';
|
||||
|
||||
# We move the GNOME sessions to another output since gnome-session is a dependency of
|
||||
# GDM itself. If we do not hide them, it will show broken GNOME sessions when GDM is
|
||||
# enabled without proper GNOME installation.
|
||||
postInstall = ''
|
||||
mkdir $sessions
|
||||
moveToOutput share/wayland-sessions "$sessions"
|
||||
moveToOutput share/xsessions "$sessions"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome3.updateScript {
|
||||
packageName = "gnome-session";
|
||||
|
|
Loading…
Reference in a new issue