2009-09-10 16:49:16 +01:00
|
|
|
# This module declares the options to define a *display manager*, the
|
2017-02-10 02:25:03 +00:00
|
|
|
# program responsible for handling X logins (such as xdm, gdb, or
|
2009-09-10 16:49:16 +01:00
|
|
|
# SLiM). The display manager allows the user to select a *session
|
|
|
|
# type*. When the user logs in, the display manager starts the
|
|
|
|
# *session script* ("xsession" below) to launch the selected session
|
|
|
|
# type. The session type defines two things: the *desktop manager*
|
|
|
|
# (e.g., KDE, Gnome or a plain xterm), and optionally the *window
|
|
|
|
# manager* (e.g. kwin or twm).
|
|
|
|
|
2014-04-14 15:26:48 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2009-09-10 16:49:16 +01:00
|
|
|
|
2014-04-14 15:26:48 +01:00
|
|
|
with lib;
|
2009-01-25 15:49:08 +00:00
|
|
|
|
|
|
|
let
|
2009-09-10 16:49:16 +01:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
cfg = config.services.xserver;
|
2009-09-10 13:37:33 +01:00
|
|
|
xorg = pkgs.xorg;
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2014-11-30 19:49:19 +00:00
|
|
|
fontconfig = config.fonts.fontconfig;
|
|
|
|
xresourcesXft = pkgs.writeText "Xresources-Xft" ''
|
2015-02-01 22:18:48 +00:00
|
|
|
${optionalString (fontconfig.dpi != 0) ''Xft.dpi: ${toString fontconfig.dpi}''}
|
2014-11-30 19:49:19 +00:00
|
|
|
Xft.antialias: ${if fontconfig.antialias then "1" else "0"}
|
|
|
|
Xft.rgba: ${fontconfig.subpixel.rgba}
|
|
|
|
Xft.lcdfilter: lcd${fontconfig.subpixel.lcdfilter}
|
|
|
|
Xft.hinting: ${if fontconfig.hinting.enable then "1" else "0"}
|
|
|
|
Xft.autohint: ${if fontconfig.hinting.autohint then "1" else "0"}
|
freetype: 2.6.5 -> 2.7.1
The Infinality bytecode interpreter is removed in favor of the new v40 TrueType
interpreter. In the past, the Infinality interpreter provided support for
ClearType-style hinting instructions while the default interpreter (then v35)
provided support only for original TrueType-style instructions. The v40
interpreter corrects this deficiency, so the Infinality interpreter is no longer
necessary.
To understand why the Infinality interpreter is no longer necessary, we should
understand how ClearType differs from TrueType and how the v40 interpreter
works. The following is a summary of information available on the FreeType
website [1] mixed with my own editorializing.
TrueType instructions use horizontal and vertical hints to improve glyph
rendering. Before TrueType, fonts were only vertically hinted; horizontal hints
improved rendering by snapping stems to pixel boundaries. Horizontal hinting is
a risk because it can significantly distort glyph shapes and kerning. Extensive
testing at different resolutions is needed to perfect the TrueType
hints. Microsoft invested significant effort to do this with its "Core fonts for
the Web" project, but few other typefaces have seen this level of attention.
With the advent of subpixel rendering, the effective horizontal resolution of
most displays increased significantly. ClearType eschews horizontal hinting in
favor of horizontal supersampling. Most fonts are designed for the Microsoft
bytecode interpreter, which implements a compatibility mode with
TrueType-style (horizontal and vertical) instructions. However, applying the
full horizontal hints to subpixel-rendered fonts leads to color fringes and
inconsistent stem widths. The Infinality interpreter implements several
techniques to mitigate these problems, going so far as to embed font- and
glyph-specific hacks in the interpreter. On the other hand, the v40 interpreter
ignores the horizontal hinting instructions so that glyphs render as they are
intended to on the Microsoft interpreter. Without the horizontal hints, the
problems of glyph and kerning distortion, color fringes, and inconsistent stem
widths--the problems the Infinality interpreter was created to solve--simply
don't occur in the first place.
There are also security concerns which motivate removing the Infinality patches.
Although there is an updated version of the Infinality interpreter for FreeType
2.7, the lack of a consistent upstream maintainer is a security concern. The
interpreter is a Turing-complete virtual machine which has had security
vulnerabilities in the past. While the default interpreter is used in billions
of devices and is maintained by an active developer, the Infinality interpreter
is neither scrutinized nor maintained. We will probably never know if there are
defects in the Infinality interpreter, and if they were discovered they would
likely never be fixed. I do not think that is an acceptable situtation for a
core library like FreeType.
Dropping the Infinality patches means that font rendering will be less
customizable. I think this is an acceptable trade-off. The Infinality
interpreter made many compromises to mitigate the problems with horizontal
hinting; the main purpose of customization is to tailor these compromises to the
user's preferences. The new interpreter does not have to make these compromises
because it renders fonts as their designers intended, so this level of
customization is not necessary.
The Infinality-associated patches are also removed from cairo. These patches
only set the default rendering options in case they aren't set though
Fontconfig. On NixOS, the rendering options are always set in Fontconfig, so
these patches never actually did anything for us!
The Fontconfig test suite is patched to account for a quirk in the way PCF fonts
are named.
The fontconfig option `hintstyle` is no longer configurable in NixOS. This
option selects the TrueType interpreter; the v40 interpreter is `hintslight` and
the older v35 interpreter is `hintmedium` or `hintfull` (which have actually
always been the same thing). The setting may still be changed through the
`localConf` option or by creating a user Fontconfig file.
Users with HiDPI displays should probably disable hinting and antialiasing: at
best they have no visible effect.
The fontconfig-ultimate settings are still available in NixOS, but they are no
longer the default. They still work, but their main purpose is to set rendering
quirks which are no longer necessary and may actually be
detrimental (e.g. setting `hintfull` for some fonts). Also, the vast array of
font substitutions provided is not an appropriate default; the default setting
should be to give the user the font they asked for.
[1]. https://www.freetype.org/freetype2/docs/subpixel-hinting.html
2017-03-05 23:39:38 +00:00
|
|
|
Xft.hintstyle: hintslight
|
2014-11-30 19:49:19 +00:00
|
|
|
'';
|
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
# file provided by services.xserver.displayManager.session.script
|
2009-09-10 16:49:16 +01:00
|
|
|
xsession = wm: dm: pkgs.writeScript "xsession"
|
|
|
|
''
|
2015-11-29 00:18:59 +00:00
|
|
|
#! ${pkgs.bash}/bin/bash
|
2009-09-10 16:49:16 +01:00
|
|
|
|
2017-04-23 04:00:08 +01:00
|
|
|
# Expected parameters:
|
|
|
|
# $1 = <desktop-manager>+<window-manager>
|
|
|
|
|
|
|
|
# Actual parameters (FIXME):
|
|
|
|
# SDDM is calling this script like the following:
|
|
|
|
# $1 = /nix/store/xxx-xsession (= $0)
|
|
|
|
# $2 = <desktop-manager>+<window-manager>
|
|
|
|
# SLiM is using the following parameter:
|
|
|
|
# $1 = /nix/store/xxx-xsession <desktop-manager>+<window-manager>
|
|
|
|
# LightDM keeps the double quotes:
|
|
|
|
# $1 = /nix/store/xxx-xsession "<desktop-manager>+<window-manager>"
|
|
|
|
# The fake/auto display manager doesn't use any parameters and GDM is
|
|
|
|
# broken.
|
|
|
|
# If you want to "debug" this script don't print the parameters to stdout
|
|
|
|
# or stderr because this script will be executed multiple times and the
|
|
|
|
# output won't be visible in the log when the script is executed for the
|
|
|
|
# first time (e.g. append them to a file instead)!
|
|
|
|
|
|
|
|
# All of the above cases are handled by the following hack (FIXME).
|
|
|
|
# Since this line is *very important* for *all display managers* it is
|
|
|
|
# very important to test changes to the following line with all display
|
|
|
|
# managers:
|
|
|
|
if [ "''${1:0:1}" = "/" ]; then eval exec "$1" "$2" ; fi
|
|
|
|
|
|
|
|
# Now it should be safe to assume that the script was called with the
|
|
|
|
# expected parameters.
|
2017-02-12 23:09:24 +00:00
|
|
|
|
2012-11-05 22:07:53 +00:00
|
|
|
. /etc/profile
|
2011-08-12 11:04:43 +01:00
|
|
|
cd "$HOME"
|
|
|
|
|
2009-09-13 14:34:52 +01:00
|
|
|
# The first argument of this script is the session type.
|
|
|
|
sessionType="$1"
|
2010-08-08 15:05:32 +01:00
|
|
|
if [ "$sessionType" = default ]; then sessionType=""; fi
|
2009-09-13 14:34:52 +01:00
|
|
|
|
2015-06-22 17:08:29 +01:00
|
|
|
${optionalString cfg.startDbusSession ''
|
|
|
|
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
|
2015-10-13 13:33:08 +01:00
|
|
|
exec ${pkgs.dbus.dbus-launch} --exit-with-session "$0" "$sessionType"
|
2009-11-21 22:14:01 +00:00
|
|
|
fi
|
|
|
|
''}
|
|
|
|
|
2017-09-14 23:08:16 +01:00
|
|
|
${optionalString cfg.displayManager.job.logToJournal ''
|
|
|
|
if [ -z "$_DID_SYSTEMD_CAT" ]; then
|
|
|
|
export _DID_SYSTEMD_CAT=1
|
|
|
|
exec ${config.systemd.package}/bin/systemd-cat -t xsession "$0" "$sessionType"
|
|
|
|
fi
|
|
|
|
''}
|
|
|
|
|
|
|
|
${optionalString cfg.displayManager.job.logToFile ''
|
|
|
|
exec &> >(tee ~/.xsession-errors)
|
|
|
|
''}
|
|
|
|
|
2011-07-26 19:16:24 +01:00
|
|
|
# Start PulseAudio if enabled.
|
2013-07-23 18:04:40 +01:00
|
|
|
${optionalString (config.hardware.pulseaudio.enable) ''
|
|
|
|
${optionalString (!config.hardware.pulseaudio.systemWide)
|
2015-10-08 10:51:10 +01:00
|
|
|
"${config.hardware.pulseaudio.package.out}/bin/pulseaudio --start"
|
2013-07-23 18:04:40 +01:00
|
|
|
}
|
2011-07-26 19:16:24 +01:00
|
|
|
|
|
|
|
# Publish access credentials in the root window.
|
2015-10-08 10:51:10 +01:00
|
|
|
${config.hardware.pulseaudio.package.out}/bin/pactl load-module module-x11-publish "display=$DISPLAY"
|
2011-07-26 19:16:24 +01:00
|
|
|
''}
|
|
|
|
|
2017-10-16 10:49:07 +01:00
|
|
|
# Tell systemd about our $DISPLAY and $XAUTHORITY.
|
|
|
|
# This is needed by the ssh-agent unit.
|
|
|
|
#
|
|
|
|
# Also tell systemd about the dbus session bus address.
|
|
|
|
# This is required by user units using the session bus.
|
|
|
|
${config.systemd.package}/bin/systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
|
2015-02-25 13:29:24 +00:00
|
|
|
|
2009-09-13 14:34:52 +01:00
|
|
|
# Load X defaults.
|
2014-11-30 19:49:19 +00:00
|
|
|
${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}
|
2014-11-07 20:21:21 +00:00
|
|
|
if test -e ~/.Xresources; then
|
|
|
|
${xorg.xrdb}/bin/xrdb -merge ~/.Xresources
|
|
|
|
elif test -e ~/.Xdefaults; then
|
2009-09-13 14:34:52 +01:00
|
|
|
${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
|
2009-09-10 16:49:16 +01:00
|
|
|
fi
|
|
|
|
|
2013-08-26 15:04:42 +01:00
|
|
|
# Speed up application start by 50-150ms according to
|
|
|
|
# http://kdemonkey.blogspot.nl/2008/04/magic-trick.html
|
2016-11-26 10:18:01 +00:00
|
|
|
rm -rf "$HOME/.compose-cache"
|
|
|
|
mkdir "$HOME/.compose-cache"
|
2013-08-26 15:04:42 +01:00
|
|
|
|
2015-09-28 14:14:44 +01:00
|
|
|
# Work around KDE errors when a user first logs in and
|
|
|
|
# .local/share doesn't exist yet.
|
2016-11-26 10:18:01 +00:00
|
|
|
mkdir -p "$HOME/.local/share"
|
2015-09-28 14:14:44 +01:00
|
|
|
|
2016-05-24 20:29:22 +01:00
|
|
|
unset _DID_SYSTEMD_CAT
|
|
|
|
|
2012-03-16 01:29:51 +00:00
|
|
|
${cfg.displayManager.sessionCommands}
|
|
|
|
|
2014-01-02 10:32:27 +00:00
|
|
|
# Allow the user to execute commands at the beginning of the X session.
|
|
|
|
if test -f ~/.xprofile; then
|
|
|
|
source ~/.xprofile
|
|
|
|
fi
|
|
|
|
|
2017-05-25 18:33:13 +01:00
|
|
|
# Start systemd user services for graphical sessions
|
|
|
|
${config.systemd.package}/bin/systemctl --user start graphical-session.target
|
|
|
|
|
2009-09-13 14:34:52 +01:00
|
|
|
# Allow the user to setup a custom session type.
|
2009-10-15 09:27:51 +01:00
|
|
|
if test -x ~/.xsession; then
|
|
|
|
exec ~/.xsession
|
|
|
|
else
|
|
|
|
if test "$sessionType" = "custom"; then
|
|
|
|
sessionType="" # fall-thru if there is no ~/.xsession
|
|
|
|
fi
|
2009-09-13 14:34:52 +01:00
|
|
|
fi
|
2009-09-10 16:49:16 +01:00
|
|
|
|
2017-04-23 04:00:08 +01:00
|
|
|
# The session type is "<desktop-manager>+<window-manager>", so
|
|
|
|
# extract those (see:
|
|
|
|
# http://wiki.bash-hackers.org/syntax/pe#substring_removal).
|
|
|
|
windowManager="''${sessionType##*+}"
|
2009-09-10 16:49:16 +01:00
|
|
|
: ''${windowManager:=${cfg.windowManager.default}}
|
2017-04-23 04:00:08 +01:00
|
|
|
desktopManager="''${sessionType%%+*}"
|
2009-09-10 16:49:16 +01:00
|
|
|
: ''${desktopManager:=${cfg.desktopManager.default}}
|
|
|
|
|
|
|
|
# Start the window manager.
|
2017-04-27 17:01:48 +01:00
|
|
|
case "$windowManager" in
|
2009-09-10 16:49:16 +01:00
|
|
|
${concatMapStrings (s: ''
|
|
|
|
(${s.name})
|
|
|
|
${s.start}
|
|
|
|
;;
|
|
|
|
'') wm}
|
|
|
|
(*) echo "$0: Window manager '$windowManager' not found.";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Start the desktop manager.
|
2017-04-27 17:01:48 +01:00
|
|
|
case "$desktopManager" in
|
2009-09-10 16:49:16 +01:00
|
|
|
${concatMapStrings (s: ''
|
|
|
|
(${s.name})
|
|
|
|
${s.start}
|
|
|
|
;;
|
|
|
|
'') dm}
|
|
|
|
(*) echo "$0: Desktop manager '$desktopManager' not found.";;
|
|
|
|
esac
|
|
|
|
|
2016-09-20 08:21:08 +01:00
|
|
|
${optionalString cfg.updateDbusEnvironment ''
|
|
|
|
${lib.getBin pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all
|
2016-04-14 10:28:10 +01:00
|
|
|
''}
|
|
|
|
|
2009-09-10 16:49:16 +01:00
|
|
|
test -n "$waitPID" && wait "$waitPID"
|
2017-05-25 18:33:13 +01:00
|
|
|
|
|
|
|
${config.systemd.package}/bin/systemctl --user stop graphical-session.target
|
|
|
|
|
2009-09-10 16:49:16 +01:00
|
|
|
exit 0
|
|
|
|
'';
|
|
|
|
|
2017-04-23 04:00:08 +01:00
|
|
|
# Desktop Entry Specification:
|
|
|
|
# - https://standards.freedesktop.org/desktop-entry-spec/latest/
|
|
|
|
# - https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
|
2015-09-01 08:42:08 +01:00
|
|
|
mkDesktops = names: pkgs.runCommand "desktops"
|
|
|
|
{ # trivial derivation
|
|
|
|
preferLocalBuild = true;
|
|
|
|
allowSubstitutes = false;
|
|
|
|
}
|
2009-09-10 16:49:16 +01:00
|
|
|
''
|
2016-11-26 10:18:01 +00:00
|
|
|
mkdir -p "$out"
|
2009-09-10 16:49:16 +01:00
|
|
|
${concatMapStrings (n: ''
|
|
|
|
cat - > "$out/${n}.desktop" << EODESKTOP
|
|
|
|
[Desktop Entry]
|
|
|
|
Version=1.0
|
|
|
|
Type=XSession
|
|
|
|
TryExec=${cfg.displayManager.session.script}
|
2017-04-23 04:00:08 +01:00
|
|
|
Exec=${cfg.displayManager.session.script} "${n}"
|
2015-06-16 12:20:20 +01:00
|
|
|
X-GDM-BypassXsession=true
|
2009-09-10 16:49:16 +01:00
|
|
|
Name=${n}
|
|
|
|
Comment=
|
|
|
|
EODESKTOP
|
|
|
|
'') names}
|
|
|
|
'';
|
2009-04-13 11:57:36 +01:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2009-09-10 16:49:16 +01:00
|
|
|
options = {
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2009-09-10 16:49:16 +01:00
|
|
|
services.xserver.displayManager = {
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2009-09-10 16:49:16 +01:00
|
|
|
xauthBin = mkOption {
|
2013-10-30 16:37:45 +00:00
|
|
|
internal = true;
|
2009-09-10 16:49:16 +01:00
|
|
|
default = "${xorg.xauth}/bin/xauth";
|
|
|
|
description = "Path to the <command>xauth</command> program used by display managers.";
|
|
|
|
};
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2009-09-10 16:49:16 +01:00
|
|
|
xserverBin = mkOption {
|
2013-10-30 16:37:45 +00:00
|
|
|
type = types.path;
|
2009-09-10 16:49:16 +01:00
|
|
|
description = "Path to the X server used by display managers.";
|
|
|
|
};
|
|
|
|
|
|
|
|
xserverArgs = mkOption {
|
2013-10-30 16:37:45 +00:00
|
|
|
type = types.listOf types.str;
|
2009-09-10 16:49:16 +01:00
|
|
|
default = [];
|
2014-12-22 20:00:32 +00:00
|
|
|
example = [ "-ac" "-logverbose" "-verbose" "-nolisten tcp" ];
|
2009-09-10 16:49:16 +01:00
|
|
|
description = "List of arguments for the X server.";
|
|
|
|
};
|
|
|
|
|
2012-03-16 01:29:51 +00:00
|
|
|
sessionCommands = mkOption {
|
2013-10-30 16:37:45 +00:00
|
|
|
type = types.lines;
|
2012-03-16 01:29:51 +00:00
|
|
|
default = "";
|
|
|
|
example =
|
|
|
|
''
|
|
|
|
xmessage "Hello World!" &
|
|
|
|
'';
|
|
|
|
description = "Shell commands executed just before the window or desktop manager is started.";
|
|
|
|
};
|
|
|
|
|
2015-03-10 01:04:40 +00:00
|
|
|
hiddenUsers = mkOption {
|
|
|
|
type = types.listOf types.str;
|
|
|
|
default = [ "nobody" ];
|
|
|
|
description = ''
|
|
|
|
A list of users which will not be shown in the display manager.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2009-09-10 16:49:16 +01:00
|
|
|
session = mkOption {
|
|
|
|
default = [];
|
2013-10-30 15:19:07 +00:00
|
|
|
example = literalExample
|
|
|
|
''
|
|
|
|
[ { manage = "desktop";
|
|
|
|
name = "xterm";
|
|
|
|
start = '''
|
|
|
|
''${pkgs.xterm}/bin/xterm -ls &
|
|
|
|
waitPID=$!
|
|
|
|
''';
|
|
|
|
}
|
|
|
|
]
|
|
|
|
'';
|
2009-09-10 16:49:16 +01:00
|
|
|
description = ''
|
|
|
|
List of sessions supported with the command used to start each
|
|
|
|
session. Each session script can set the
|
|
|
|
<varname>waitPID</varname> shell variable to make this script
|
|
|
|
wait until the end of the user session. Each script is used
|
|
|
|
to define either a windows manager or a desktop manager. These
|
|
|
|
can be differentiated by setting the attribute
|
|
|
|
<varname>manage</varname> either to <literal>"window"</literal>
|
|
|
|
or <literal>"desktop"</literal>.
|
|
|
|
|
|
|
|
The list of desktop manager and window manager should appear
|
|
|
|
inside the display manager with the desktop manager name
|
|
|
|
followed by the window manager name.
|
|
|
|
'';
|
|
|
|
apply = list: rec {
|
|
|
|
wm = filter (s: s.manage == "window") list;
|
|
|
|
dm = filter (s: s.manage == "desktop") list;
|
2010-08-08 15:05:32 +01:00
|
|
|
names = flip concatMap dm
|
2017-04-23 04:00:08 +01:00
|
|
|
(d: map (w: d.name + optionalString (w.name != "none") ("+" + w.name))
|
2010-08-08 15:05:32 +01:00
|
|
|
(filter (w: d.name != "none" || w.name != "none") wm));
|
2009-09-10 16:49:16 +01:00
|
|
|
desktops = mkDesktops names;
|
|
|
|
script = xsession wm dm;
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
2009-09-10 16:49:16 +01:00
|
|
|
};
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2013-10-15 16:22:30 +01:00
|
|
|
job = {
|
2011-09-14 19:20:50 +01:00
|
|
|
|
2013-10-15 16:22:30 +01:00
|
|
|
preStart = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
|
|
|
example = "rm -f /var/log/my-display-manager.log";
|
|
|
|
description = "Script executed before the display manager is started.";
|
|
|
|
};
|
|
|
|
|
|
|
|
execCmd = mkOption {
|
2013-10-30 10:02:04 +00:00
|
|
|
type = types.str;
|
2014-08-27 22:41:15 +01:00
|
|
|
example = literalExample ''
|
|
|
|
"''${pkgs.slim}/bin/slim"
|
|
|
|
'';
|
2013-10-15 16:22:30 +01:00
|
|
|
description = "Command to start the display manager.";
|
|
|
|
};
|
|
|
|
|
|
|
|
environment = mkOption {
|
2013-10-30 16:37:45 +00:00
|
|
|
type = types.attrsOf types.unspecified;
|
2013-10-15 16:22:30 +01:00
|
|
|
default = {};
|
2014-08-27 22:41:15 +01:00
|
|
|
example = { SLIM_CFGFILE = "/etc/slim.conf"; };
|
2013-10-15 16:22:30 +01:00
|
|
|
description = "Additional environment variables needed by the display manager.";
|
|
|
|
};
|
|
|
|
|
2017-09-14 23:08:16 +01:00
|
|
|
logToFile = mkOption {
|
2013-10-15 16:22:30 +01:00
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
2017-09-14 23:08:16 +01:00
|
|
|
Whether the display manager redirects the output of the
|
|
|
|
session script to <filename>~/.xsession-errors</filename>.
|
2013-10-15 16:22:30 +01:00
|
|
|
'';
|
2009-09-10 16:49:16 +01:00
|
|
|
};
|
2011-09-14 19:20:50 +01:00
|
|
|
|
2017-09-14 23:08:16 +01:00
|
|
|
logToJournal = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
description = ''
|
|
|
|
Whether the display manager redirects the output of the
|
|
|
|
session script to the systemd journal.
|
|
|
|
'';
|
|
|
|
};
|
2009-09-10 16:49:16 +01:00
|
|
|
|
2016-05-24 20:29:22 +01:00
|
|
|
};
|
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
2011-09-14 19:20:50 +01:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
2009-09-10 16:49:16 +01:00
|
|
|
|
2014-09-18 15:12:36 +01:00
|
|
|
config = {
|
2015-10-17 23:53:13 +01:00
|
|
|
services.xserver.displayManager.xserverBin = "${xorg.xorgserver.out}/bin/X";
|
2017-05-25 18:33:13 +01:00
|
|
|
|
|
|
|
systemd.user.targets.graphical-session = {
|
|
|
|
unitConfig = {
|
|
|
|
RefuseManualStart = false;
|
|
|
|
StopWhenUnneeded = false;
|
|
|
|
};
|
|
|
|
};
|
2014-09-18 15:12:36 +01:00
|
|
|
};
|
|
|
|
|
2016-02-28 09:35:43 +00:00
|
|
|
imports = [
|
2016-03-26 23:01:43 +00:00
|
|
|
(mkRemovedOptionModule [ "services" "xserver" "displayManager" "desktopManagerHandlesLidAndPower" ]
|
|
|
|
"The option is no longer necessary because all display managers have already delegated lid management to systemd.")
|
2016-02-28 09:35:43 +00:00
|
|
|
];
|
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
}
|