diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2020-01-06 09:51:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-06 09:51:59 -0500 |
commit | 00c813a63628a6bbc315f08687c55a5fb5fa1c91 (patch) | |
tree | 82a2e18e7c9e8daada43bfbf94f2872f5f20cdfa /nixos/modules/services/x11/display-managers | |
parent | 6bd13ccd8e7fd1f241eb655f7112df1ed2889a3a (diff) | |
parent | 15a9c80c056b7c9a337874dabd3e053457cc776c (diff) |
Merge pull request #75893 from worldofpeace/gdm-tmpfiles
nixos/gdm: use systemd tmpfiles instead of preStart
Diffstat (limited to 'nixos/modules/services/x11/display-managers')
-rw-r--r-- | nixos/modules/services/x11/display-managers/gdm.nix | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 6630f012f04f..4de3dbd87701 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -159,22 +159,21 @@ in GDM_X_SESSION_WRAPPER = "${xSessionWrapper}"; }; execCmd = "exec ${gdm}/bin/gdm"; - preStart = optionalString config.hardware.pulseaudio.enable '' - mkdir -p /run/gdm/.config/pulse - ln -sf ${pulseConfig} /run/gdm/.config/pulse/default.pa - chown -R gdm:gdm /run/gdm/.config - '' + optionalString config.services.gnome3.gnome-initial-setup.enable '' - # Create stamp file for gnome-initial-setup to prevent run. - mkdir -p /run/gdm/.config - cat - > /run/gdm/.config/gnome-initial-setup-done <<- EOF - yes - EOF - '' + optionalString (defaultSessionName != null) '' + preStart = optionalString (defaultSessionName != null) '' # Set default session in session chooser to a specified values – basically ignore session history. ${setSessionScript}/bin/set-session ${cfg.sessionData.autologinSession} ''; }; + systemd.tmpfiles.rules = [ + "d /run/gdm/.config 0711 gdm gdm -" + ] ++ optionals config.hardware.pulseaudio.enable [ + "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" + ]; + systemd.services.display-manager.wants = [ # Because sd_login_monitor_new requires /run/systemd/machines "systemd-machined.service" |