Commit Graph

84 Commits

Author SHA1 Message Date
Artturin
33b7bd2675 nixos/gdm: switch to rfc42 style settings 2021-10-01 20:53:49 +03:00
Michele Guerini Rocco
0e848f7b12
Merge pull request #134302 from rnhmjoj/gdm-no-udev-settle
nixos/gdm: remove udev-settle dependency
2021-09-15 09:52:10 +02:00
Jörg Thalheim
9b962429be
Merge pull request #133014 from Mic92/fix-pam
nixos: reduce pam files rebuilds on updates
2021-08-20 23:23:42 +01:00
Jörg Thalheim
1645acf1d3 nixos: reduce pam files rebuilds on updates
Before whenever environment variables changed, pam files had to be
rebuild.

This is expensive since each file needs its own sandbox set up.
2021-08-20 23:43:30 +02:00
rnhmjoj
ff9df147c9
nixos/gdm: remove udev-settle dependency
See https://github.com/NixOS/nixpkgs/issues/73095

It looks like it can finally be removed: the `Failed to open gpu
'/dev/dri/card0'` error is gone and the nixosTests.gnome test is
passing (checked 4 times in a row).
2021-08-16 11:40:38 +02:00
Artturin
47f6591706 nixos/gdm: disable the gdm services as it is redundant
and causes issues
2021-08-10 01:43:38 +03:00
Ryan Mulligan
073f462987 nixos/gdm: expand gdm.autoSuspend description
closes #100390
2021-06-29 19:35:26 -07:00
Jan Tojnar
468cb5980b gnome: rename from gnome3
Since GNOME version is now 40, it no longer makes sense to use the old attribute name.
2021-05-08 09:47:42 +02:00
Jan Tojnar
d2e141e412
gnome3.gdm: 3.38.2.1 → 40.0 2021-05-05 22:42:32 +02:00
WORLDofPEACE
4287f5adfa
Merge pull request #100569 from andersk/gdm-plymouth
nixos/gdm: Conflict plymouth-quit, but more carefully
2021-02-21 11:03:18 -05:00
Vladimír Čunát
2f6b00b15e
Merge branch 'staging-next' into staging 2020-10-25 09:47:04 +01:00
Piotr Bogdan
f1f85419d2
nixos/gdm: add gdm to systemd.packages
GDM now provides gnome-session@gnome-login.target.d/session.conf though I'm not even sure if it's needed.
2020-10-24 01:15:14 +02:00
Anders Kaseorg
da5401e022 nixos/gdm: Conflict plymouth-quit, but more carefully
To avoid extra flickering on boot, we want GDM to tell Plymouth to
quit after GDM takes control of the display.  That configuration was
reverted in #71065 because it caused ‘nixos-rebuild switch’ to bring
down the graphical session.  The reason was that if multi-user.target
wants plymouth-quit.service which conflicts display-manager.service,
then when ‘nixos-rebuild switch’ starts multi-user.target,
display-manager.service is stopped so plymouth-quit.service can be
started.  We avoid this problem by removing WantedBy:
multi-user.target from plymouth-quit.service.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2020-10-15 02:04:00 -07:00
Malte Brandy
cebf9198f3
treewide: De-inline uses of lib.boolToString
This commit should not change eval results
2020-10-14 01:46:17 +02:00
WORLDofPEACE
b552ded466 nixos/gdm: fix option descriptions
If we use '' '' for strings with mkEnableOption they get a trailing space
before the period.
2020-09-11 14:14:41 -04:00
Florian Klink
962e15aebc nixos: remove StandardOutput=syslog, StandardError=syslog lines
Since systemd 243, docs were already steering users towards using
`journal`:

eedaf7f322

systemd 246 will go one step further, it shows warnings for these units
during bootup, and will [automatically convert these occurences to
`journal`](f3dc6af20f):

> [    6.955976] systemd[1]: /nix/store/hwyfgbwg804vmr92fxc1vkmqfq2k9s17-unit-display-manager.service/display-manager.service:27: Standard output type syslog is obsolete, automatically updating to journal. Please update│······················
 your unit file, and consider removing the setting altogether.

So there's no point of keeping `syslog` here, and it's probably a better
idea to just not set it, due to:

> This setting defaults to the value set with DefaultStandardOutput= in
> systemd-system.conf(5), which defaults to journal.
2020-08-13 18:49:15 +02:00
worldofpeace
490cd7889e nixos/displayManager: make autoLogin options independent of DM type
Co-authored-by: volth <volth@volth.com>
2020-07-09 21:15:35 -04:00
Dominik Xaver Hörl
c10d82358f treewide: add types to boolean / enable options or make use of mkEnableOption 2020-04-27 09:32:01 +02:00
Jan Tojnar
f74f2f3548
nixos/gdm: fix startup
In 7f838b4dde, we dropped systemd-udev-settle.service from display-manager.service's wants.
Unfortunately, we are doing something wrong since without it both Xorg and Wayland fail to start:

	Failed to open gpu '/dev/dri/card0': GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Operation not permitted

Until we sort this out, let's add systemd-udev-settle.service to GDM to unblock the channels.
2020-04-05 16:40:30 +02:00
worldofpeace
b0ac19e050 nixos: add freedesktop/gnome/myself maintainers 2020-04-01 20:53:09 -04:00
tobim
44a4a3839c
nixos/gdm: Fix pulseaudio tmpfiles structure (#80274)
* 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>
2020-02-23 07:50:19 -05:00
Elyhaka
d18ac2bca1 gdm: refactor to properly handle wayland sessions 2020-01-18 10:56:11 +01:00
Anders Kaseorg
07ccbc099a nixos/gdm: Fix tmpfiles configuration syntax
Fixes this error from `nixos-rebuild switch` introduced by #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>
2020-01-08 19:51:32 -08:00
worldofpeace
15a9c80c05 nixos/gdm: use systemd tmpfiles instead of preStart
Thet was a mess before. This should be more reliable.
2019-12-18 15:40:12 -05:00
Jan Tojnar
8dc5ff7dcf
nixos/displayManager: deprecate separate options for default wm/dm
The upstream session files display managers use have no concept of sessions being composed from
desktop manager and window manager. To be able to set upstream session files as default
session, we need a single option. Having two different ways to set default session would be confusing,
though, so we decided to deprecate the old method.

We also created separate script for each session, just like we already had a separate desktop
file for each one, and started using displayManager.sessionPackages mechanism to make the
session handling more uniform.
2019-12-15 04:16:20 +01:00
Tor Hedin Brønner
d04157fb98 nixos/gdm: do not force the session
Having a default session resulted in GDM not remembering the last used
session.

So do not force the session until setSessionScript is made aware of the
last session used.
2019-12-11 13:50:18 +01:00
Jan Tojnar
8cbc862b83
dconf: move to top-level 2019-12-01 01:01:40 +01:00
worldofpeace
1b5df99e7a
Merge pull request #70295 from worldofpeace/mutter-eglstreams
Mutter eglstreams
2019-11-27 05:29:58 +00:00
worldofpeace
d8b50bfe47 nixos/gdm: make desktopManager.default work
Unfortunately, you can't configure the default user-session
with GDM like lightdm. I've opened a feature request [0]
but I'd like to be able to do this now.

We use a GObject Python script using bindings to AccountsService
to achieve this. I'm hoping the reliable heuristic for session names
is the file's basename. We also have some special logic for which
method to use to set the default session. It seems set_x_session is
deprecated, and thusly the XSession key, but if that method isn't used
when it's an xsession it won't be the default in GDM.

[0]: https://gitlab.gnome.org/GNOME/gdm/issues/535
2019-11-22 17:47:03 -05:00
worldofpeace
d41a2e3398 nixos/gdm: disable wayland when modesetting is disabled
Probably a good idea to have.
2019-11-19 15:34:39 -05:00
worldofpeace
84e6784aae nixos/gdm: add nvidiaWayland option 2019-11-19 15:34:39 -05:00
worldofpeace
ed20a541c5 nixos/gdm: don't conflict with plymouth-quit
Co-Authored-By: Tor Hedin Brønner <torhedinbronner@gmail.com>
2019-10-13 13:30:43 -04:00
Tor Hedin Brønner
5b7c900192
nixos/gdm: do not restart on reload switch (#70357)
Not entirely sure how this works, but this does seem to fix reload switch
killing the current graphical session.
2019-10-11 20:07:16 +02:00
Tor Hedin Brønner
9be5321097 nixos/gdm: follow upstream's service config 2019-10-05 05:15:29 +02:00
Tor Hedin Brønner
1efac91ca4 nixos/gdm: make config dir for gnome-initial-setup
Observed failure to lauch gdm in a VM due to missing /run/gdm.config.
2019-10-05 05:15:29 +02:00
worldofpeace
f462b376bb
nixos/gdm: prevent g-i-s from running 2019-10-03 00:09:12 +02:00
Tor Hedin Brønner
fc43be57f0 nixos/gdm: start after getty@tty1
GDM is now killed if tty1 is started after gdm is launched. This follows
upstream's gdm service config.

This might cause problems with nixos-rebuild switch though. See the reasoning
and work that led to not following upstream on this:
  https://github.com/NixOS/nixpkgs/issues/21439
  4a180da
  c46d4da
2019-09-30 19:39:49 +02:00
worldofpeace
e4cce87fba nixos/gdm: update description
GDM isn't dangerous anymore in NixOS.
2019-09-27 17:42:39 -04:00
worldofpeace
453036c8a7 nixos/gdm: don't set XCURSOR_PATH 2019-09-18 11:13:42 -04:00
Robert Helgesson
866cc3e792 nixos/system-environment: introduce environment.profileRelativeSessionVariables
There is a need for having sessionVariables set relative to the Nix Profiles.
Such as in #68383.
2019-09-18 11:09:43 -04:00
Patrick Chilton
7c854aa974 nixos/gdm: add autoSuspend option 2019-08-06 18:08:21 -04:00
Nikolay Amiantov
00972dc89c nixos/gdm: use Fedora's PulseAudio configuration
This is needed to avoid GDM PulseAudio instance acting as a network
source/sink or grabing the A2DP bluetooth sink making A2DP unusable
for any other user. In the future having this fixed in PulseAudio
would be preferred [0]. Current possible upstream fix could be [1].

[0]: https://github.com/NixOS/nixpkgs/pull/61746#issuecomment-493956980
[1]: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/10
2019-06-02 18:01:53 -04:00
Alexander Kahl
5b9895b1a0 nixos/gdm: use provided PAM login configuration wherever possible
Fixes #21859
2019-04-14 09:49:01 -04:00
Tor Hedin Brønner
2c8565a3ce
nixos/gdm: use XDG_DATA_DIRS to find sessions
Gdm now searches for session files in XDG_DATA_DIRS so we no longer need the
sessions_dir.patch.
2018-11-30 21:34:47 +01:00
Matthew Bauer
1ffe83caa7
Merge pull request #42846 from ambrop72/optimus-prime-config-master
nixos/xserver: Implement configuration of NVIDIA Optimus via PRIME
2018-10-03 22:56:53 -05:00
Peter Simons
1af8f3a980 nixos: include system-level dconf resources in GDM's profile
This is necessary when system-wide dconf settings must be configured, i.e. to
disable GDM's auto-suspending of the machine when no user is logged in.

Related to https://github.com/NixOS/nixpkgs/issues/42053.
2018-10-02 13:27:59 +02:00
lassulus
fc035da4a4 xserver.displayManager: change default
Switch from slim to lightdm as the display-manager.
    If plasma5 is used as desktop-manager use sdddm.
    If gnome3 is used as desktop-manager use gdm.

    Based on #12516
2018-08-31 17:57:39 +02:00
Tor Hedin Brønner
9fad9fb869
nixos/displayManager: Create a common environment wrapper for all dms
This makes it easier to support a wider variety of .desktop session files. In
particular this makes it possible to use both the «legacy» sessions and upstream
session files.

We separate `xsession` into two parts, `xsessionWrapper` and `xsession`.
`xsessionWrapper` sets up the correct environment and then lauches the session's
Exec command (from the .desktop file), falling back to launching the default
window/desktopManager through the `xsession` script (required by at least some
nixos tests).

`xsession` then _only_ handles launching desktop-managers/window-managers defined
through `services.xserver.desktopManager.session`.
2018-08-01 19:14:32 +02:00
Jan Tojnar
cc6d77c83f
gnome3.gdm: add upstream xsession 2018-08-01 19:14:30 +02:00
Jan Tojnar
a8c6489fd4
nixos/services.xserver.displayManager: move X sessions to a subdirectory
Previously, the mkDesktops function produced a flat package containing
session files in the top level. As a preparation for introduction of
Wayland sessions, the files will now be placed to $out/share/xsessions.
2018-08-01 19:14:29 +02:00