Navigation Menu

Skip to content
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

Merged
merged 1 commit into from Jan 6, 2020

Conversation

worldofpeace
Copy link
Contributor

Motivation for this change

Thet was a mess before. This should be more reliable.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Thet was a mess before. This should be more reliable.
Copy link
Contributor

@hedning hedning left a 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 👍

@worldofpeace
Copy link
Contributor Author

systemd.tmpfiles.rules = [
"d /run/gdm/.config 0711 gdm gdm -"
] ++ optionals config.hardware.pulseaudio.enable [
"L+ /run/gdm/.config/pulse - - - - ${pulseConfig}"
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@worldofpeace
Copy link
Contributor Author

@GrahamcOfBorg test gnome3

@worldofpeace worldofpeace merged commit 00c813a into NixOS:master Jan 6, 2020
@worldofpeace worldofpeace deleted the gdm-tmpfiles branch January 6, 2020 14:52
"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"
Copy link
Contributor

@andersk andersk Jan 9, 2020

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

#77355

andersk added a commit to andersk/nixpkgs that referenced this pull request Jan 9, 2020
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>
tobim added a commit to tobim/nixpkgs that referenced this pull request Feb 16, 2020
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.
```
worldofpeace added a commit that referenced this pull request Feb 23, 2020
* 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>
worldofpeace pushed a commit that referenced this pull request Feb 23, 2020
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants