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
nixos/gdm: use systemd tmpfiles instead of preStart #75893
Conversation
Thet was a mess before. This should be more reliable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, much nicer 👍
For ref the syntax https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html. |
systemd.tmpfiles.rules = [ | ||
"d /run/gdm/.config 0711 gdm gdm -" | ||
] ++ optionals config.hardware.pulseaudio.enable [ | ||
"L+ /run/gdm/.config/pulse - - - - ${pulseConfig}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a comment why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly, but from this diff it looks undercomented. pulseConfig is prominently commented above, I'm not sure this was commented before.
@GrahamcOfBorg test gnome3 |
"L+ /run/gdm/.config/pulse - - - - ${pulseConfig}" | ||
] ++ optionals config.services.gnome3.gnome-initial-setup.enable [ | ||
# Create stamp file for gnome-initial-setup to prevent it starting in GDM. | ||
"f /run/gdm/.config/gnome-initial-setup-done 0711 gdm gdm yes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes nixos-rebuild switch
to fail:
setting up tmpfiles
[/etc/tmpfiles.d/nixos.conf:7] Invalid age 'yes'.
warning: error(s) occurred while switching to the new configuration
Fixes this error from `nixos-rebuild switch` introduced by NixOS#75893: setting up tmpfiles [/etc/tmpfiles.d/nixos.conf:7] Invalid age 'yes'. warning: error(s) occurred while switching to the new configuration Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Fix the following startup failure of the sound service in the gdm session that was introduced by NixOS#75893: ``` Feb 16 11:44:15 qp pulseaudio[1432]: W: [pulseaudio] core-util.c: Failed to open configuration file '/run/gdm/.config/pulse//daemon.conf': Not a directory Feb 16 11:44:15 qp pulseaudio[1432]: W: [pulseaudio] daemon-conf.c: Failed to open configuration file: Not a directory Feb 16 11:44:15 qp systemd[1380]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE Feb 16 11:44:15 qp systemd[1380]: pulseaudio.service: Failed with result 'exit-code'. Feb 16 11:44:15 qp systemd[1380]: Failed to start Sound Service. ```
* nixos/gdm: Fix pulseaudio tmpfiles structure Fix the following startup failure of the sound service in the gdm session that was introduced by #75893: ``` Feb 16 11:44:15 qp pulseaudio[1432]: W: [pulseaudio] core-util.c: Failed to open configuration file '/run/gdm/.config/pulse//daemon.conf': Not a directory Feb 16 11:44:15 qp pulseaudio[1432]: W: [pulseaudio] daemon-conf.c: Failed to open configuration file: Not a directory Feb 16 11:44:15 qp systemd[1380]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE Feb 16 11:44:15 qp systemd[1380]: pulseaudio.service: Failed with result 'exit-code'. Feb 16 11:44:15 qp systemd[1380]: Failed to start Sound Service. ``` Co-authored-by: worldofpeace <worldofpeace@protonmail.ch>
* nixos/gdm: Fix pulseaudio tmpfiles structure Fix the following startup failure of the sound service in the gdm session that was introduced by #75893: ``` Feb 16 11:44:15 qp pulseaudio[1432]: W: [pulseaudio] core-util.c: Failed to open configuration file '/run/gdm/.config/pulse//daemon.conf': Not a directory Feb 16 11:44:15 qp pulseaudio[1432]: W: [pulseaudio] daemon-conf.c: Failed to open configuration file: Not a directory Feb 16 11:44:15 qp systemd[1380]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE Feb 16 11:44:15 qp systemd[1380]: pulseaudio.service: Failed with result 'exit-code'. Feb 16 11:44:15 qp systemd[1380]: Failed to start Sound Service. ``` Co-authored-by: worldofpeace <worldofpeace@protonmail.ch> (cherry picked from commit 44a4a38)
Motivation for this change
Thet was a mess before. This should be more reliable.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @