Commit Graph

416 Commits

Author SHA1 Message Date
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
00c813a636
Merge pull request #75893 from worldofpeace/gdm-tmpfiles
nixos/gdm: use systemd tmpfiles instead of preStart
2020-01-06 09:51:59 -05:00
Tor Hedin Brønner
3d70d4ba0b
nixos/displayManager: fix typo in legacy sessions (#76626)
xsession gets passed `dm` `wm`, so the desktop manager would be launched
before the window manager resulting in a regular desktop manager
session.

Fixes https://github.com/NixOS/nixpkgs/issues/76625
2019-12-29 02:02:24 +01: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
53ef29c138
nixos/lightdm: enable wayland sessions
Note: can't launch gnome on wayland due to duplicate entry names:
  https://github.com/CanonicalLtd/lightdm/issues/16
2019-12-15 04:16:20 +01:00
Tor Hedin Brønner
d25365c3c1
nixos/displayManager: introduce defaultSession
There's two ways of providing graphical sessions now:
- `displayManager.session` via. `desktopManager.session` and
  `windowManager.session`
- `displayManager.sessionPackages`

`sessionPackages` doesn't make a distinction between desktop and window
managers. This makes selecting a session provided by a package using
`desktopManager.default` nonsensical.

We therefor introduce `displayManager.defaultSession` which can select a session
from either `displayManager.session` or `displayManager.sessionPackages`.

It will default to `desktopManager.default + windowManager.default` as before.
If the dm default is "none" it will select the first provided session from
`sessionPackages`.
2019-12-15 04:16:20 +01:00
Tor Hedin Brønner
58e5290fce
nixos/displayManager: check for provided sessions in mkDesktops 2019-12-15 04:16:20 +01:00
Tor Hedin Brønner
dd7144b860
nixos/sessionPackages: provide session names in passthru
We want access to the valid session names at evaluation time.
2019-12-15 04:16:18 +01:00
Tor Hedin Brønner
d362df6682
nixos/display-manager: extraSessionFilePackages -> sessionPackages 2019-12-15 04:14:56 +01:00
worldofpeace
a24004fa38 nixos/lightdm-greeters/pantheon: show manual login card
I find this important to be default on for users in https://github.com/elementary/greeter/issues/394
2019-12-12 07:22:37 -05: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
Silvan Mosberger
4ee3e8b21d
nixos/treewide: Move rename.nix imports to their respective modules
A centralized list for these renames is not good because:
- It breaks disabledModules for modules that have a rename defined
- Adding/removing renames for a module means having to find them in the
central file
- Merge conflicts due to multiple people editing the central file
2019-12-10 02:51:19 +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
519448d2e3 nixos/gdm: don't raise an Exception in set-session script
https://github.com/NixOS/nixpkgs/pull/73378#discussion_r349825541
2019-11-22 18:05:31 -05:00
worldofpeace
bec88e1110
Merge pull request #73378 from worldofpeace/gdm-default-session
nixos/gdm: make desktopManager.default work
2019-11-22 22:49:15 +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
ce26b3eaf0 nixos/slim: remove
The SLIM project is abandoned and their last release was in 2013.
Because of this it poses a security risk to systems, no one is working
on it or picked up maintenance. It also lacks compatibility with systemd
and logind sessions. For users, there liikely isn't anything like slim
that's as lightweight in terms of dependencies.
2019-11-11 17:10:41 -05:00
ft
5834d78a20 ssdm: fix identifier for xserver-wrapper 2019-10-19 16:36:29 -07:00
worldofpeace
6d5fe6b8ed
Merge pull request #71065 from worldofpeace/gdm-no-plymouth-conflict
nixos/gdm: don't conflict with plymouth-quit
2019-10-13 17:34:00 +00: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
d15e5b02fe
nixos/lightdm: do not conflict with plymouth (#71061)
Having `display-manager` conflict with `plymouth-quit` causes this lock up:

 - `plymouth-quit-wait` starts up, waiting for plymouth-quit to run
 - `lightdm` starts up
 - `plymouth-quit` can't start, it conflicts with lightdm
 - `plymouth-quit-wait` keeps waiting on plymouth-quit to kill plymouthd

The idea is having LightDM control when plymouth quits, but communication with
plymouth was broken: https://github.com/NixOS/nixpkgs/pull/71064

Unfortunately having the conflict breaks switching to configurations with
plymouth enabled. So we still need to remove the conflict.

fixes #71034
2019-10-13 10:03:54 +02: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
worldofpeace
67ac11e072 nixos/lightdm: improve systemd service
These improvements come from shopping around
at what other downstreams have done with their
systemd units and recent changes like [0] to gdm.

Note there's no requries or after on dbus.socket because
settings BusName will set this up automaticallly and
give it a type of dbus.

[0]: 2d57f45962
2019-10-06 10:23:21 -04: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
760b677c19
Merge pull request #68729 from worldofpeace/elementary-greeter/master
nixos/pantheon: use Pantheon's greeter
2019-09-18 11:16:21 -04:00
worldofpeace
5669b06235 lightdm-mini-greeter: put xgreeters in passthru 2019-09-18 11:13:43 -04:00
worldofpeace
b558eb8329 nixos/lightdm-gtk-greeter: don't wrap in module 2019-09-18 11:13:43 -04:00
worldofpeace
7814a2f566 nixos/enso-os: don't wrap in module 2019-09-18 11:13:42 -04:00
worldofpeace
feab607ae5 nixos/sddm: don't set XDG_DATA_DIRS
environment.profileRelativeSessionVariables should make this unneeded.
2019-09-18 11:13:42 -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
worldofpeace
a99ef0345d nixos/lightdm/pantheon: provide xgreeters in package 2019-09-13 21:31:12 -04:00
worldofpeace
4b2e250f9e nixos/lightdm/pantheon: drop warning
This issue has been fixed in the latest release.
2019-09-13 21:31:03 -04:00
worldofpeace
4e89375846
Merge pull request #67917 from worldofpeace/lightdm-pam-gnome-keyring
nixos/lightdm: fix pam rules
2019-09-06 18:50:07 -04:00
worldofpeace
0c602541a3 nixos/lightdm: fix pam rules
Rules are a translation of what's done in the
GDM module and adjustments based of looking at
Arch Linux's configuration and upstream's.

A side effect of this change is that gnome-keyring
and kwallet modules should work as expected when in-
cluded.

Fixes #64259 #62045
2019-09-06 18:22:22 -04:00
Vladimír Čunát
f21211ebfe
Merge branch 'master' into staging 2019-09-02 23:25:24 +02:00
Silvan Mosberger
478e7184f8
nixos/modules: Remove all usages of types.string
And replace them with a more appropriate type

Also fix up some minor module problems along the way
2019-08-31 18:19:00 +02:00
Frederik Rietdijk
ad1d58c622 Merge staging-next into staging 2019-08-31 10:04:20 +02:00
Hugo Geoffroy
a23798e478 nixos/x11: provide selected session to custom session
The custom session script is always executed (when it exists). This change
passes the selected session script and select session name to the custom session
script, so that it can defer to the selected session script based on the value
of the selected session name.
2019-08-28 16:58:12 +02:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00: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
Alyssa Ross
7658c90f21
nixos/xserver: improve DM error message when X off
Previously, if you, for example, set
services.xserver.displayManager.sddm.enable, but forgot to set
services.xserver.enable, you would get an error message that looked like
this:

    error: attribute 'display-manager' missing

Which was not particularly helpful.

Using assertions, we can make this message much better.
2019-05-02 16:19:59 +00:00
mlvzk
113bb0a7e9 nixos/display-managers/startx: fix typos for startx option description
`~/.xinintrc` => `~/.xinitrc`
`autmatically` => `automatically`
2019-04-21 07:46:37 +00:00
Aaron Andersen
4a11ce7f26
cleanup redundant text in modules utilizing mkEnableOption
Closes #59911
2019-04-20 14:44:02 +02:00
Alexander Kahl
5b9895b1a0 nixos/gdm: use provided PAM login configuration wherever possible
Fixes #21859
2019-04-14 09:49:01 -04:00
Linus Heckemann
4557373d68
Merge pull request #58858 from worldofpeace/pantheon/lightdm-gtk-greeter
nixos/pantheon: enable lightdm gtk greeter
2019-04-10 09:36:20 +02:00
worldofpeace
d3d5c674ba nixos/lightdm-greeters/pantheon: add warning 2019-04-07 17:51:19 -04:00
Bob van der Linden
1eefda5595
nixos/xpra: /var/run -> /run 2019-03-24 21:15:33 +01:00
Frederik Rietdijk
c2eac6741b Merge master into staging-next 2019-02-24 09:19:12 +01:00
Symphorien Gibol
a915b33315 nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
Jan Tojnar
606ceda352
gnome3: stop using aliases 2019-02-14 02:31:15 +01:00
Matthew Bauer
5c09d977c7 Merge remote-tracking branch 'origin/master' into staging 2019-02-09 12:14:06 -05:00
Franz Pletz
14dd9ca1b2
Merge pull request #54706 from pbogdan/lightdm-cursors
nixos/lightdm: allow cursor theme customisation.
2019-02-03 09:09:48 +00:00
Piotr Bogdan
6e581656d1 nixos/lightdm: inherit DPI settings from xserver config 2019-01-28 18:00:28 +00:00
Piotr Bogdan
4ad82dd6cd nixos/lightdm: allow cursor theme customisation. 2019-01-28 17:59:28 +00:00
worldofpeace
78da8d668b pantheon: init a 5.0 2019-01-24 20:54:14 +00:00
Сухарик
a285cead44 nixos/display-managers: allow pure wayland sessions 2019-01-03 09:38:36 +03:00
worldofpeace
94af8ebde2 nixos/displayManager: only install wayland sessions if they exist in extraSessionFilePackages
Not everyone is using wayland just yet.
2018-12-22 01:15:09 -05:00
Elis Hirwing
6fa51fe5cf
nixos/lightdm: Fix spelling of option in docs 2018-12-13 22:26:12 +01:00
Elis Hirwing
c974813b92
nixos/sddm: Fix spelling of option in docs 2018-12-13 22:25:19 +01:00
Tor Hedin Brønner
3c0e70402f nixos/displayManager: Note that sessionCommands aren't run on Wayland 2018-12-10 10:36:25 +01:00
Tor Hedin Brønner
48a9a24910 nixos/sddm: Enable wayland-sessions
LightDM is unable to separate between `wayland-sessions/gnome.desktop` and
`xsessions/gnome.desktop` so I ommitted adding this to LightDM.
2018-12-10 10:36:24 +01:00
Tor Hedin Brønner
9895ce24b4 nixos/displayManager: Install wayland sessions from extraSessionFilePackages 2018-12-09 11:04:42 +01: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
Tobias Happ
4839403dd6 nixos/{lightdm,sddm,xpra}: remove enabling of logToFile 2018-11-13 21:52:37 +01:00
Will Dietz
2603e3a5e9 gtk: don't hardcode glibc use
(cherry picked from commit 6e6f839093ad080c3a61810e9720165faf103e81)
2018-10-30 19:52:03 -05:00
xeji
af6e2464bb
nixos/display-managers/startx: init (#47773)
Dummy display manager that allows running X as a normal user.
The X server is started manually from a vt using `startx`.
Session startup commands must be provided by the user
in ~/.xinitrc, which is NOT automatically generated.
2018-10-10 23:07:44 +02:00
Matthew Bauer
7432fde1ad
Merge pull request #44920 from eadwu/init/lightdm-enso-os-greeter
lightdm-enso-os-greeter: init at 0.2.1
2018-10-08 13:54:31 -05: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
Alyssa Ross
c1dbb90bfd lightdm: add extraConfig option (#47630) 2018-10-02 00:35:32 +02:00
Michael Peyton Jones
5b3c8485d6 sddm: link whole sddm directory, not just themes (#47174) 2018-09-22 19:23:31 +02:00
Edmund Wu
1a15b10ae3 lightdm: fix tmpfiles path (#46886) 2018-09-19 16:54:13 +02:00
Graham Christensen
c8cc8d496d
Merge pull request #46777 from erikarvstedt/docs
Improve docs
2018-09-17 09:31:30 -04:00
Erik Arvstedt
4c755e1218 nixos display-managers: fix typo in description 2018-09-17 15:03:01 +02:00
worldofpeace
67e9571ba4 nixos/lightdm: use systemd.tmpfiles (#46734)
This also makes logs appear at /var/log/lightdm
2018-09-17 11:02:21 +02:00
Uli Baum
5f72169b03 nixos/displayManagers/auto: allow root auto-login
The switch from slim to lightdm in #30890 broke some nixos tests
because lightdm by default doesn't permit auto-login for root.
Override /etc/pam.d/lightdm-autologin to allow it.
2018-09-02 08:18:10 +02:00
volth
2413fcdfeb services.xserver.windowManager.session: handle duplicate names (#37690) 2018-09-01 21:27:17 +02:00
xeji
ff679f86a2
Merge pull request #30890 from Lassulus/slim-lightdm
display-managers: make lightdm the default
2018-09-01 16:11:38 +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
Samuel Dionne-Riel
bc5b26b4ab Reviews use of old nixos wallpaper to use one with the new logo.
The wallpaper used is *structurally compatible* with the other one,
meaning that the logo is at the same location, and not bigger.

It has one drawback: the logo is brighter, which clashes with the grub
usage. This is to be fixed with new options in grub.
2018-08-29 00:04:58 -04:00
Mitsuhiro Nakamura
7fbdd7fcf4 lightdm: enable the accounts daemon to find dbus interface 2018-08-16 21:52:25 +09:00
Mitsuhiro Nakamura
6c84945099 lightdm: fix typos 2018-08-16 21:52:25 +09:00
Edmund Wu
2d1ecc482d
lightdm-enso-os-greeter: init at 0.2.1 2018-08-14 11:06:17 -04:00
Edmund Wu
ced374cf98
display-managers: rely on socket to activate pulseaudio 2018-08-10 12:43:47 -04:00
Deven Lahoti
414e6de41a nixos/sddm: add /share/sddm/themes to environment.pathsToLink
Without this, there are no SDDM themes available in the directory configured in `sddm.conf`.
2018-08-09 15:17:22 -05:00
xeji
1258e6dd3a
Merge pull request #43421 from rembo10/lightdm-gtk-greeter
nixos/lightdm-gtk-greeter: svg icon support
2018-08-04 17:55:54 +02:00
Silvan Mosberger
fcb4254276
Merge pull request #43610 from jfrankenau/fix-pulse-module-x11-publish
nixos/display-managers: fix loading of module-x11-publish
2018-08-03 17:00:14 +02:00
Johannes Frankenau
b7ce7d5b3f nixos/display-managers: fix loading of module-x11-publish
module-x11-publish is only provided by the pulseaudioFull package.
2018-08-03 12:22:28 +02:00
Tor Hedin Brønner
efa27d33cf
nixos/desktopManager: Only trace if the default session isn't found
The default session might be found in `extraSessionFilePackages`, but it's not
viable to detect at evaluation time, so emit a warning.

In LightDM instead of checking `defaultSessionName` against
`displayManager.session.names` we rely on the assertions in
`desktopManager` and `windowMananger` and just check that there's at least one
default set. The second assertion could never actually be triggered.
2018-08-01 19:14:32 +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
83fc9a9825
nixos/display-manager.default: add extraSessionFilePackages option 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
volth
cc55a3ebcb treewide: fix build with disallowed aliases (#43872)
fixes build with disallowed aliases
2018-07-21 22:03:24 -04:00
Jörg Thalheim
e9ff0f9448
Merge pull request #43863 from volth/unused4
[bot] nixos/*: remove unused arguments in lambdas
2018-07-21 16:39:08 +01:00
volth
2e979e8ceb [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
volth
6d2857a311 [bot] treewide: remove unused 'inherit' in let blocks 2018-07-20 19:38:19 +00:00
rembo10
c84e668109 nixos/lightdm-gtk-greeter: svg icon support 2018-07-12 18:20:07 +03:00
Ambroz Bizjak
f26153754a nixos/xserver: Implement configuration of NVIDIA Optimus via PRIME
This adds configuration options which automate the configuration of NVIDIA Optimus using PRIME. This allows using the NVIDIA proprietary driver on Optimus laptops, in order to render using the NVIDIA GPU while outputting to displays connected only to the integrated Intel GPU. It also adds an option for enabling kernel modesetting for the NVIDIA driver (via a kernel command line flag); this is particularly useful together with Optimus/PRIME because it fixes tearing on PRIME-connected screens.

The user still needs to enable the Optimus/PRIME feature and specify the bus IDs of the Intel and NVIDIA GPUs, but this is still much easier for users and more reliable. The implementation handles both the X configuration file as well as getting display managers to run certain necessary `xrandr` commands just after X has started.

Configuration of commands run after X startup is done using a new configuration option `services.xserver.displayManager.setupCommands`. Support for this option is implemented for LightDM, GDM and SDDM; all of these have been tested with this feature including logging into a Plasma session.

Note: support of `setupCommands` for GDM is implemented by making GDM run the session executable via a wrapper; the wrapper will run the `setupCommands` before execing. This seemed like the simplest and most reliable approach, and solves running these commands both for GDM's X server and user X servers (GDM starts separate X servers for itself and user sessions). An alternative approach would be with autostart files but that seems harder to set up and less reliable.

Note that some simple features for X configuration file generation (in `xserver.nix`) are added which are used in the implementation:
- `services.xserver.extraConfig`: Allows adding arbitrary new sections. This is used to add the Device section for the Intel GPU.
- `deviceSection` and `screenSection` within `services.xserver.drivers`. This allows the nvidia configuration module to add additional contents into the `Device` and `Screen` sections of the "nvidia" driver, and not into such sections for other drivers that may be enabled.
2018-07-09 18:46:13 +02:00
Peter Hoeg
cd4e54b3a1 sddm: use tmpfiles.d to wipe QML cache 2018-07-09 14:51:05 +08:00
Florian Klink
fff5923686 nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
Mitsuhiro Nakamura
83b389394b lightdm-mini-greeter: init at 0.3.2 2018-06-18 18:55:06 +09:00
Peter Hoeg
159c1576c8
Merge pull request #40579 from peterhoeg/m/sddm
sddm: add support for hidpi mode
2018-05-30 16:23:07 +08:00
Jan Tojnar
54135fc733
gnome3.gdm: allow choosing user account without GNOME
Account chooser depends on AccountsService, which is normally enabled by
GNOME module but it was missing when using GDM without GNOME.
2018-05-16 16:25:22 +02:00
Peter Hoeg
b368a1103b sddm: add support for hidpi mode 2018-05-16 12:15:29 +08:00
Jan Malakhovski
7079e744d4 Merge branch 'master' into staging
Resolved the following conflicts (by carefully applying patches from the both
branches since the fork point):

   pkgs/development/libraries/epoxy/default.nix
   pkgs/development/libraries/gtk+/3.x.nix
   pkgs/development/python-modules/asgiref/default.nix
   pkgs/development/python-modules/daphne/default.nix
   pkgs/os-specific/linux/systemd/default.nix
2018-03-10 20:38:13 +00:00
Will Fancher
6b9a99e55d LightDM: Set default user session when possible. 2018-03-04 23:54:09 +00:00
Shea Levy
fec543436d
nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
Jan Tojnar
a31d98f312
tree-wide: autorename gnome packages to use dashes 2018-02-25 17:41:16 +01:00
José Romildo Malaquias
d0eb40b311 lightdm-gtk-greater: add configuration options for clock format and indicators 2018-01-06 02:20:53 +00:00
rnhmjoj
13bb5ff402
nixos/xserver: fix X.org session script logging 2017-11-27 11:29:37 +01:00
Pierre Chevalier
c46d4dab96 gdm: remove old workaround for conflicts with getty
- There used to be a conflict between gdm and getty both trying to
  access tty1
- This conflict was fixed by running gdm on tty7 instead
2017-11-19 19:35:37 +01:00
Pierre Chevalier
aed114ecb9 Revert "gdm: don't start getty@tty1 if enabled"
This commit isn't needed anymore since we now run gdm on tty7.

This reverts commit 440178d729.
2017-11-19 19:35:37 +01:00
lassulus
440178d729 gdm: don't start getty@tty1 if enabled 2017-10-30 21:43:10 +01:00
Jonas Schwabe
4a180dac60 gdm: fix restart of display-manager after nixos-rebuild
- fix restart of display-manager due to a conflict with getty@tty1
- fixes #21439
2017-10-28 15:52:03 +02:00
Thomas Tuegel
dae260034c
nixos/sddm: delete QML cache
Prior to Qt 5.9.2, there is a QML cache invalidation bug which causes SDDM to
segfault when upgrading Plasma.

See also: https://bugreports.qt.io/browse/QTBUG-62302
2017-10-19 07:09:01 -05:00
adisbladis
40f402cf65
display-managers: Import DBUS session bus address & Xauthority in systemd user session 2017-10-17 10:06:05 +08:00
Peter Hoeg
f359096210 Revert "sddm: silence error about missing wayland directory"
This reverts commit 46a92333e9.
2017-10-14 14:42:48 +08:00
Peter Hoeg
46a92333e9 sddm: silence error about missing wayland directory 2017-10-14 14:38:04 +08:00
Rostislav Beneš
0cad98dde1
nixos/xserver,gdm: let GDM handle X server verbosity. 2017-09-28 00:18:57 +02:00
Rostislav Beneš
4ef82339c9
nixos/gdm,nvidia: new options to enable GDM on Wayland and disabling it for nvidia drivers. 2017-09-28 00:18:57 +02:00
Jan Tojnar
69698ec11c gnome3: only maintain single GNOME 3 package set (#29397)
* gnome3: only maintain single GNOME 3 package set

GNOME 3 was split into 3.10 and 3.12 in #2694. Unfortunately, we barely have the resources
to update a single version of GNOME. Maintaining multiple versions just does not make sense.
Additionally, it makes viewing history using most Git tools bothersome.

This commit renames `pkgs/desktops/gnome-3/3.24` to `pkgs/desktops/gnome-3`, removes
the config variable for choosing packageset (`environment.gnome3.packageSet`), updates
the hint in maintainer script, and removes the `gnome3_24` derivation from `all-packages.nix`.

Closes: #29329

* maintainers/scripts/gnome: Use fixed GNOME 3 directory

Since we now allow only a single GNOME 3 package set, specifying
the working directory is not necessary.

This commit sets the directory to `pkgs/desktops/gnome-3`.
2017-09-24 12:15:50 +01:00
Jaka Hudoklin
4521225d22 nixos/xpra: allow to set extra options (#28934) 2017-09-03 16:30:08 +01:00
Tom Hunger
932b167321 Fix indentation. 2017-08-28 15:56:04 +01:00
Linus Heckemann
b73e3b6095 GNOME: 3.22 -> 3.24
This is a squash commit of the joint work from:

* Jan Tojnar (@jtojnar)
* Linus Heckemann (@lheckemann)
* Ryan Mulligan (@ryantm)
* romildo (@romildo)
* Tom Hunger (@teh)
2017-08-28 15:32:49 +01:00
Thomas Tuegel
dab7700f6c
qt58: determine plugin and import paths from PATH
Plugin and QML import paths were previously determined by NIX_PROFILES. Using
PATH instead allows Qt applications to work under nix-shell without further
modification.
2017-06-18 08:44:47 -05:00
Thomas Tuegel
870c07cc2b
sddm: take themes from system environment 2017-06-18 08:43:39 -05:00
romildo
aa8018103c nixos-artwork: add more wallpapers
Restructure the nixos-artwork to make it easy to selectively
incorporate other components from upstream without needing to download
the full package.

Until now only the Gnome_Dark wallpaper was included. Add other
wallpapers available in the package repository.
2017-06-07 18:00:58 -03:00
Franz Pletz
1e95e114e5
nixos/xsession: use graphical systemd user target
While systemd suggests using the pre-defined graphical-session user
target, I found that this interface is difficult to use. Additionally,
no other major distribution, even in their unstable versions, currently
use this mechanism.

The window or desktop manager is supposed to run in a systemd user service
which activates graphical-session.target and the user services that are
binding to this target. The issue is that we can't elegantly pass the
xsession environment to the window manager session, in particular
whereas the PassEnvironment option does work for DISPLAY, it for some
mysterious reason won't for PATH.

This commit implements a new graphical user target that works just like
default.target. Services which should be run in a graphical session just
need to declare wantedBy graphical.target. The graphical target will be
activated in the xsession before executing the window or display manager.

Fixes #17858.
2017-05-29 15:05:28 +02:00
Michael Weiss
1273f414a7 display-managers: Fix the xsession parameters
The xsession script was called with inconsistent (depending on the
display managers) and wrong parameters. The main reason for this where
the spaces the parameter syntax. In order to fix this the old syntax:
$1 = '<desktop-manager> + <window-manager>'
Will be replaced with a new syntax:
$1 = "<desktop-manager>+<window-manager>"

This assumes that neither "<desktop-manager>" nor "<window-manager>"
contain the "+" character but this shouldn't be a problem.

This patch also fixes the quoting by using double quotes (") instead of
single quotes (') [0].

Last but not least this'll add some comments for the better
understanding of the script.

[0]: https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
2017-04-28 22:00:14 +02:00
Judson Lester
0d72629570 nixos/display-managers: Quote "$vars" (#25199) 2017-04-27 18:01:48 +02:00
aszlig
83e1400e0c
nixos/slim: Implement logging to journal
The main change here is a patch of SLiM to tread a log file of
/dev/stderr specially in that it now uses std::cerr instead of a file
for logging.

This allows us to set the logfile to stderr in NixOS for the generated
SLiM configuration file and we now get logging to the systemd journal.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-04-23 19:25:23 +02:00
Michael Weiss
e1244f6e8a Revert "display-manager: fix argument handling of sddm"
This reverts commit 6b7c5ba535.

Unfortunately it seems like this broke slim, lightdm and gdm (see #25068
and #23264). This is already reverted in the 17.03 branch (99dfb6d).

TODO: We need tests for slim and lightdm and fix the test for gdm
(failing since 2016-10-26) to prevent such breakage in the future.
2017-04-23 03:19:07 +02:00
Jörg Thalheim
6b7c5ba535
display-manager: fix argument handling of sddm
previously session type was not correctly set.

fixes #23264
2017-04-18 01:41:17 +02:00
Franz Pletz
3ab45f4b36
treewide: use boolToString function 2017-04-11 18:18:53 +02:00
Robin Gloster
d1228f95e9
Revert "Revert "gdm module: only make xserver args overrideable""
This reverts commit 4e57e7f7c6.

This actually broke gnome3 and didn't fix anything, I failed bisecting.
2017-03-27 17:20:56 +02:00
Vladimír Čunát
455ce3528c
Merge branch 'staging' 2017-03-24 21:07:55 +01:00
Robin Gloster
4e57e7f7c6
Revert "gdm module: only make xserver args overrideable"
This reverts commit a5aa926902.

This allows gdm to run again, the test is still failing.
2017-03-24 10:35:20 +01:00
Vladimír Čunát
c1a9dc3d37
Merge branch 'master' into staging 2017-03-23 13:31:28 +01:00