Skip to content

nixos/gdm: fix greeter#517777

Merged
emilazy merged 1 commit into
NixOS:staging-nextfrom
enzuru:gnome-50-fix-gdm
May 13, 2026
Merged

nixos/gdm: fix greeter#517777
emilazy merged 1 commit into
NixOS:staging-nextfrom
enzuru:gnome-50-fix-gdm

Conversation

@enzuru
Copy link
Copy Markdown

@enzuru enzuru commented May 7, 2026

image

This fixes GDM permissions so that users can login and logout appropriately. GNOME 50 is broken without these permission changes.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci Bot requested a review from a team May 7, 2026 18:18
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 12.first-time contribution This PR is the author's first one; please be gentle! 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels May 7, 2026
@enzuru enzuru force-pushed the gnome-50-fix-gdm branch from eea487a to 9f615d7 Compare May 7, 2026 18:19
Comment thread nixos/modules/services/display-managers/gdm.nix Outdated
@enzuru
Copy link
Copy Markdown
Author

enzuru commented May 8, 2026

thanks @qweered I committed your change, fixed a syntax issue, and linted it.

I realized BTW my local build of GNOME 50 was cached from a previous PR, and was not rebased on staging. I am doing that right now. I may need to re-test everything tomorrow as I need to go to sleep soon.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. labels May 8, 2026
@vcunat vcunat changed the base branch from staging to staging-next May 8, 2026 08:21
@nixpkgs-ci nixpkgs-ci Bot closed this May 8, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this May 8, 2026
@enzuru enzuru force-pushed the gnome-50-fix-gdm branch from 113781b to 00670d0 Compare May 8, 2026 17:44
@enzuru
Copy link
Copy Markdown
Author

enzuru commented May 8, 2026

Okay, so after rebuilding this patch on GNOME I am running into an unrelated failure about a gnome-tecla patch that may be outdated. GNOME used to do this:

Util.spawn(['tecla']);

which we patched to

Util.spawn(['@tecla@']);

https://github.com/NixOS/nixpkgs/pull/517777/changes#diff-7599d9270d69fe3616b5323e252158c9e9f3168a52942e98cd2cdfba1796cb25L34

50.1 now does this:

Shell.AppSystem.get_default().lookup_app('org.gnome.Tecla.desktop');

https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/50.1/js/ui/status/keyboard.js?ref_type=tags#L1178

I think the old patch is no longer needed.

Added as a separate commit.

@nekowinston
Copy link
Copy Markdown
Member

Okay, so after rebuilding this patch on GNOME I am running into an unrelated failure about a gnome-tecla patch that may be outdated.

#518038

@enzuru
Copy link
Copy Markdown
Author

enzuru commented May 8, 2026

ah okay @nekowinston , let me undo my commit then, thanks

@enzuru enzuru force-pushed the gnome-50-fix-gdm branch from 00670d0 to e9df391 Compare May 8, 2026 17:51
@nekowinston
Copy link
Copy Markdown
Member

Can confirm this works (building from staging-next @ d6a0b47), but it still feels like a workaround to keep #440720 (comment) working rather than preparing for the blog post linked in #458058.

I'm looking into getting userdbd to work.

@enzuru
Copy link
Copy Markdown
Author

enzuru commented May 8, 2026

I can confirm that after rebasing on staging-next that this patch works still.

@nekowinston
Copy link
Copy Markdown
Member

@enzuru does the much smaller patch

diff --git a/nixos/modules/services/display-managers/gdm.nix b/nixos/modules/services/display-managers/gdm.nix
index 38b9f919bab2..79eb5b4537cc 100644
--- a/nixos/modules/services/display-managers/gdm.nix
+++ b/nixos/modules/services/display-managers/gdm.nix
@@ -44,6 +44,10 @@ let
   defaultSessionName = config.services.displayManager.defaultSession;
 
   setSessionScript = pkgs.callPackage ../x11/display-managers/account-service-util.nix { };
+
+  greeterEnvFile = pkgs.writeText "gdm-greeter-env" ''
+    DCONF_PROFILE=gdm
+  '';
 in
 
 {
@@ -452,6 +456,12 @@ in
               settings.conffile = "/etc/pam/environment";
               settings.readenv = 0;
             }
+            {
+              name = "env-greeter";
+              control = "required";
+              modulePath = "${config.security.pam.package}/lib/security/pam_env.so";
+              settings.envfile = greeterEnvFile;
+            }
             {
               name = "systemd";
               control = "optional";

also still work for you?

Comment thread nixos/modules/services/display-managers/gdm.nix Outdated
@enzuru
Copy link
Copy Markdown
Author

enzuru commented May 9, 2026

Will try your smaller patch tonight PST, thanks for all the support @nekowinston

@enzuru enzuru force-pushed the gnome-50-fix-gdm branch from e9df391 to 13759be Compare May 10, 2026 05:16
@enzuru
Copy link
Copy Markdown
Author

enzuru commented May 10, 2026

thanks @nekowinston the much smaller patch worked, I've updated this PR accordingly

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels May 10, 2026
@enzuru enzuru changed the title nixos/gdm: fix greeter permissions nixos/gdm: fix greeter May 10, 2026
@nekowinston nekowinston mentioned this pull request May 11, 2026
13 tasks
@nekowinston
Copy link
Copy Markdown
Member

I'm looking into getting userdbd to work.

I opened #519148 :)

Copy link
Copy Markdown
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch looks benign to me, so I’m going to merge this to unblock GNOME 50 for the cycle. Sorry to the GNOME team if this is overstepping; please feel free to revert if necessary.

@emilazy emilazy added this pull request to the merge queue May 13, 2026
@emilazy
Copy link
Copy Markdown
Member

emilazy commented May 13, 2026

Oh, staging-next already branched off. So I guess this needs a backport.

Merged via the queue into NixOS:staging-next with commit 3ebe6fc May 13, 2026
33 of 35 checks passed
@emilazy
Copy link
Copy Markdown
Member

emilazy commented May 13, 2026

Oh, sorry, no; staging branched off but staging-next didn’t. So this is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants