nixos/gdm: update gdm-greeter user homes, add warning for pulseaudio#521789
Conversation
This reverts commit 13759be.
4fa32ac to
674298d
Compare
This fixes gdm not being able to save config changes made on the log-in
screen, such as turning on accessibility options. The new values for the
`gdm-greeter{-2,-3,-4,-5}` users map onto what userdbd would create for us.
We need writable home directories to interact with `dbus`, as well as to
populate the `/run/gdm/home/gdm-greeter/.config/environment.d/` files.
`gnome-inital-setup-done` is now seemingly called `gdm.ran-initial-setup`:
https://gitlab.gnome.org/GNOME/gdm/-/blob/gnome-50/daemon/gdm-manager.c?ref_type=heads#L64
674298d to
9320dc9
Compare
gdm-greeter user homesgdm-greeter user homes, add warning for pulseaudio
We plan to use systemd-userdbd for NixOS 26.11, which will dynamically allocate greeter users + their homes, which would break the current PA config. GNOME already depends on PipeWire in other places, so there's little reason to keep this around.
9320dc9 to
82ed78a
Compare
|
@bobby285271 sorry for the ping, but could you give this a try? the current config on nixos-unstable causes accessibility issues or at least unnecessary coredumps & journal logs. |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/weird-gdm-greeter-n-warnings-since-nix-flake-update/77915/3 |
|
|
||
| config = lib.mkIf cfg.enable { | ||
|
|
||
| warnings = lib.optional config.services.pulseaudio.enable "Support for Pulseaudio + gdm will be removed in NixOS 26.11"; |
There was a problem hiding this comment.
My NixOS setup strongly depends on pipewire & pulseaudio working together (See also #353789 ), and I wish to keep this setup and hopefully not have to switch to a different desktop manager. Hence I wonder: Why using systemd-userdbd makes it impossible to use pulseaudio with GDM? Also, maybe we can live fine with gdm not being able to play audio with pulseaudio, and we don't have to disallow this during evaluation.
There was a problem hiding this comment.
This might be poorly worded, my plan wasn't to disallow evaluation of gdm+pulse; but I don't know if we'll be able to keep the workaround of https://github.com/nixos/nixpkgs/blob/82ed78a9ee81eada31b619ebcdbb248daa123b9a/nixos/modules/services/display-managers/gdm.nix#L28-L42 to fix the issues listed in the linked archlinux wiki talk.
I also don't know if these issues are still around almost 10 years later; I just saw Fedora dropped the configuration as well, as they're exclusively supporting pipewire now.
There was a problem hiding this comment.
I don't see any reason for this workaround to not work when systemd-userdbd will be used -- the paths of the home directories will be the same. I guess Fedora dropped this because they don't need it for their default setups and because they don't use Nix it is much harder for them to maintain this. Even if we will notice something is broken with gdm+pulse when systemd-userdbd is enabled by default, we can worry about that latter. Please revert the warning 🙏.
There was a problem hiding this comment.
Can we create tmpfiles rules for dynamic users?
There was a problem hiding this comment.
Can we create tmpfiles rules for dynamic users?
Why not? If I understand correctly, systemd-tmpfiles-setup.service runs when it is aware of all the user's IDs etc.
This fixes gdm not being able to save config changes made on the log-in screen, such as turning on accessibility options.
ibus-daemonalso currently coredumps multiple times when gdm starts because of the write protected home directory, which this PR also fixes.The previous workaround with the special pam env file is no longer needed; as was suggested in #458058 (comment)
There's more info in the commit messages too :)
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.