Commit graph

42 commits

Author SHA1 Message Date
Elis Hirwing c974813b92
nixos/sddm: Fix spelling of option in docs 2018-12-13 22:25:19 +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
Tobias Happ 4839403dd6 nixos/{lightdm,sddm,xpra}: remove enabling of logToFile 2018-11-13 21:52:37 +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
Michael Peyton Jones 5b3c8485d6 sddm: link whole sddm directory, not just themes (#47174) 2018-09-22 19:23:31 +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
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
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 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
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
Peter Hoeg b368a1103b sddm: add support for hidpi mode 2018-05-16 12:15:29 +08:00
rnhmjoj 13bb5ff402
nixos/xserver: fix X.org session script logging 2017-11-27 11:29:37 +01: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
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
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
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
Franz Pletz 3ab45f4b36
treewide: use boolToString function 2017-04-11 18:18:53 +02:00
Thomas Tuegel a96e047b31
nixos/sddm: replace themes option with package option 2017-03-22 07:44:55 -05:00
Vladimír Čunát a1ae627362
nixos GDM: fix #19896
- As noted on github, GDM needs different parameters for X.
- Making xserverArgs a true list instead of concat-string helps to
  filter it and it feels more correct anyway.
- Tested: gdm+gnome, lightdm+gnome.  There seems to be no logout option
  in gnome, and gdm doesn't offer other sessions, but maybe these are normal.
2016-12-04 14:54:31 +01:00
Eelco Dolstra 69bea26ea9 sddm: Enable user switching
It was lacking the dbus configuration to bind to
org.freedesktop.DisplayManager, and it was passing fixed TTY/display
numbers to the X server (see 9be012f0d4).
2016-11-16 23:38:50 +01:00
Emery Hemingway b675619391 nixos: use types.lines for extraConfig 2016-10-23 19:41:43 +02:00
Kirill Boltaev 1978d00458 sddm: wrap xserver in systemd-cat to make logs appear in the journal 2016-10-05 00:07:23 +03:00
Ioannis Koutras d78e68b1a4 sddm: 0.13.0 -> 0.14.0 2016-09-16 15:09:18 +03:00
Benno Fünfstück 8881f940a9 nixos/sddm: options documentation improvements 2016-07-17 18:54:23 +02:00
Vladimír Čunát ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
Tony White c95bd5d085 sddm: add numlock switch
- added numlock on boot switch
- simply add :
services.xserver.displayManager.sddm.autoNumlock = true;
to configuration.nix and sddm will start
with numlock enabled.
2016-01-26 06:17:32 +00:00
Vladimír Čunát f9f6f41bff Merge branch 'master' into closure-size
TODO: there was more significant refactoring of qtbase and plasma 5.5
on master, and I'm deferring pointing to correct outputs to later.
2015-12-31 09:53:02 +01:00
Thomas Tuegel fac138a2f5 nixos/sddm: fix indentation 2015-12-12 11:36:45 -06:00
Thomas Tuegel b07fa98f82 nixos/sddm: add setupScript and stopScript options
These options allow setting the start and stop scripts for the display
manager. Making these configurable is necessary to allow some hardware
configurations. Upstream ships empty scripts by default, anyway.
2015-12-12 11:31:26 -06:00
Luca Bruno 5b0352a6a4 Merge branch 'master' into closure-size 2015-12-11 18:31:00 +01:00
Thomas Tuegel 78a6d62b48 sddm: wrap to include themes 2015-12-11 07:09:07 -06:00
Vladimír Čunát 333d69a5f0 Merge staging into closure-size
The most complex problems were from dealing with switches reverted in
the meantime (gcc5, gmp6, ncurses6).
It's likely that darwin is (still) broken nontrivially.
2015-11-20 14:32:58 +01:00
Benno Fünfstück d767aae721 sddm module: support autologin configuration 2015-10-31 16:04:52 +01:00
Benno Fünfstück a92c024c7f sddm: allow extra config options 2015-10-28 22:04:40 +01:00
Tuomas Tynkkynen db81e22148 treewide: Mass-replace 'xorgserver}/bin' with correct output
vcunat added one fix in xdummy.
2015-10-28 10:17:12 +01:00
William A. Kennington III ff21171921 Fix references to current-system/sw/sbin 2015-04-01 13:57:36 -07:00
William A. Kennington III ffed8a85bc nixos/sddm: Hide users which don't have login shells 2015-03-10 14:32:53 -07:00
Nikolay Amiantov db5b08cfaf nixos/sddm: add display manager 2015-03-05 20:49:26 +03:00