aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/x11
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/x11')
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/mate.nix1
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix5
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.xml130
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix178
-rw-r--r--nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix11
-rw-r--r--nixpkgs/nixos/modules/services/x11/display-managers/default.nix7
-rw-r--r--nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix5
-rw-r--r--nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix92
-rw-r--r--nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix1
-rw-r--r--nixpkgs/nixos/modules/services/x11/unclutter.nix2
-rw-r--r--nixpkgs/nixos/modules/services/x11/urxvtd.nix6
-rw-r--r--nixpkgs/nixos/modules/services/x11/xserver.nix76
12 files changed, 421 insertions, 93 deletions
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/mate.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/mate.nix
index 4a6f2ca727d..910a246d776 100644
--- a/nixpkgs/nixos/modules/services/x11/desktop-managers/mate.nix
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/mate.nix
@@ -86,6 +86,7 @@ in
pkgs.shared-mime-info
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
pkgs.mate.mate-settings-daemon
+ pkgs.yelp # for 'Contents' in 'Help' menus
];
programs.dconf.enable = true;
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix
index b46a2d189ef..869c6694489 100644
--- a/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.nix
@@ -16,7 +16,10 @@ in
{
- meta.maintainers = pkgs.pantheon.maintainers;
+ meta = {
+ doc = ./pantheon.xml;
+ maintainers = pkgs.pantheon.maintainers;
+ };
options = {
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.xml b/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.xml
new file mode 100644
index 00000000000..4d92a7446c0
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/pantheon.xml
@@ -0,0 +1,130 @@
+<chapter xmlns="http://docbook.org/ns/docbook"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xml:id="chap-pantheon">
+ <title>Pantheon Destkop</title>
+ <para>
+ Pantheon is the desktop environment created for the elementary OS distribution. It is written from scratch in Vala, utilizing GNOME technologies with GTK 3 and Granite.
+ </para>
+ <section xml:id="sec-pantheon-enable">
+ <title>Enabling Pantheon</title>
+
+ <para>
+ All of Pantheon is working in NixOS and the applications should be available, aside from a few <link xlink:href="https://github.com/NixOS/nixpkgs/issues/58161">exceptions</link>. To enable Pantheon, set
+<programlisting>
+<xref linkend="opt-services.xserver.desktopManager.pantheon.enable"/> = true;
+</programlisting>
+ This automatically enables LightDM and Pantheon's LightDM greeter. If you'd like to disable this, set
+<programlisting>
+<xref linkend="opt-services.xserver.displayManager.lightdm.greeters.pantheon.enable"/> = false;
+<xref linkend="opt-services.xserver.displayManager.lightdm.enable"/> = false;
+</programlisting>
+ but please be aware using Pantheon without LightDM as a display manager will break screenlocking from the UI. The NixOS module for Pantheon installs all of Pantheon's default applications. If you'd like to not install Pantheon's apps, set
+<programlisting>
+<xref linkend="opt-services.pantheon.apps.enable"/> = false;
+</programlisting>
+ You can also use <xref linkend="opt-environment.pantheon.excludePackages"/> to remove any other app (like <package>geary</package>).
+ </para>
+ </section>
+ <section xml:id="sec-pantheon-wingpanel-switchboard">
+ <title>Wingpanel and Switchboard plugins</title>
+
+ <para>
+ Wingpanel and Switchboard work differently than they do in other distributions, as far as using plugins. You cannot install a plugin globally (like with <option>environment.systemPackages</option>) to start using it. You should instead be using the following options:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="opt-services.xserver.desktopManager.pantheon.extraWingpanelIndicators"/>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="opt-services.xserver.desktopManager.pantheon.extraSwitchboardPlugs"/>
+ </para>
+ </listitem>
+ </itemizedlist>
+ to configure the programs with plugs or indicators.
+ </para>
+
+ <para>
+ The difference in NixOS is both these programs are patched to load plugins from a directory that is the value of an environment variable. All of which is controlled in Nix. If you need to configure the particular packages manually you can override the packages like:
+<programlisting>
+wingpanel-with-indicators.override {
+ indicators = [
+ pkgs.some-special-indicator
+ ];
+};
+
+switchboard-with-plugs.override {
+ plugs = [
+ pkgs.some-special-plug
+ ];
+};
+</programlisting>
+ please note that, like how the NixOS options describe these as extra plugins, this would only add to the default plugins included with the programs. If for some reason you'd like to configure which plugins to use exactly, both packages have an argument for this:
+<programlisting>
+wingpanel-with-indicators.override {
+ useDefaultIndicators = false;
+ indicators = specialListOfIndicators;
+};
+
+switchboard-with-plugs.override {
+ useDefaultPlugs = false;
+ plugs = specialListOfPlugs;
+};
+</programlisting>
+ this could be most useful for testing a particular plug-in in isolation.
+ </para>
+ </section>
+ <section xml:id="sec-pantheon-faq">
+ <title>FAQ</title>
+
+ <variablelist>
+ <varlistentry xml:id="sec-pantheon-faq-messed-up-theme">
+ <term>
+ I have switched from a different desktop and Pantheon’s theming looks messed up.
+ </term>
+ <listitem>
+ <para>
+ Open Switchboard and go to: <guilabel>Administration</guilabel> → <guilabel>About</guilabel> → <guilabel>Restore Default Settings</guilabel> → <guibutton>Restore Settings</guibutton>. This will reset any dconf settings to their Pantheon defaults. Note this could reset certain GNOME specific preferences if that desktop was used prior.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry xml:id="sec-pantheon-faq-slow-shutdown">
+ <term>
+ Using Pantheon sometimes makes my shutdown take a long time.
+ </term>
+ <listitem>
+ <para>
+ We have not yet determined what processes fight with systemd during shutdown, there are many reports. In elementary OS the default system timeout is lowered to lessen the impact of the issue. If you'd like to do this in NixOS, set
+<programlisting>
+ <xref linkend="opt-systemd.extraConfig"/> = ''
+ DefaultTimeoutStopSec=10s
+ DefaultTimeoutStartSec=10s
+'';
+</programlisting>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry xml:id="sec-pantheon-faq-gnome3-and-pantheon">
+ <term>
+ I cannot enable both GNOME 3 and Pantheon.
+ </term>
+ <listitem>
+ <para>
+ This is a known <link xlink:href="https://github.com/NixOS/nixpkgs/issues/64611">issue</link> and there is no known workaround.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry xml:id="sec-pantheon-faq-appcenter">
+ <term>
+ Does AppCenter work, or is it available?
+ </term>
+ <listitem>
+ <para>
+ AppCenter has been available since 20.03, but it is of little use. This is because there is no functioning PackageKit backend for Nix 2.0. In the near future you will be able to install Flatpak applications from AppCenter on NixOS. See this <link xlink:href="https://github.com/NixOS/nixpkgs/issues/70214">issue</link>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+</chapter>
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix
index 2538858ac0f..60ef0159ff1 100644
--- a/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma5.nix
@@ -8,6 +8,137 @@ let
cfg = xcfg.desktopManager.plasma5;
inherit (pkgs) kdeApplications plasma5 libsForQt5 qt5;
+ inherit (pkgs) writeText;
+
+ pulseaudio = config.hardware.pulseaudio;
+ pactl = "${getBin pulseaudio.package}/bin/pactl";
+ startplasma-x11 = "${getBin plasma5.plasma-workspace}/bin/startplasma-x11";
+ sed = "${getBin pkgs.gnused}/bin/sed";
+
+ gtkrc2 = writeText "gtkrc-2.0" ''
+ # Default GTK+ 2 config for NixOS Plasma 5
+ include "/run/current-system/sw/share/themes/Breeze/gtk-2.0/gtkrc"
+ style "user-font"
+ {
+ font_name="Sans Serif Regular"
+ }
+ widget_class "*" style "user-font"
+ gtk-font-name="Sans Serif Regular 10"
+ gtk-theme-name="Breeze"
+ gtk-icon-theme-name="breeze"
+ gtk-fallback-icon-theme="hicolor"
+ gtk-cursor-theme-name="breeze_cursors"
+ gtk-toolbar-style=GTK_TOOLBAR_ICONS
+ gtk-menu-images=1
+ gtk-button-images=1
+ '';
+
+ gtk3_settings = writeText "settings.ini" ''
+ [Settings]
+ gtk-font-name=Sans Serif Regular 10
+ gtk-theme-name=Breeze
+ gtk-icon-theme-name=breeze
+ gtk-fallback-icon-theme=hicolor
+ gtk-cursor-theme-name=breeze_cursors
+ gtk-toolbar-style=GTK_TOOLBAR_ICONS
+ gtk-menu-images=1
+ gtk-button-images=1
+ '';
+
+ kcminputrc = writeText "kcminputrc" ''
+ [Mouse]
+ cursorTheme=breeze_cursors
+ cursorSize=0
+ '';
+
+ activationScript = ''
+ ${set_XDG_CONFIG_HOME}
+
+ # The KDE icon cache is supposed to update itself automatically, but it uses
+ # the timestamp on the icon theme directory as a trigger. This doesn't work
+ # on NixOS because the timestamp never changes. As a workaround, delete the
+ # icon cache at login and session activation.
+ # See also: http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html
+ rm -fv $HOME/.cache/icon-cache.kcache
+
+ # xdg-desktop-settings generates this empty file but
+ # it makes kbuildsyscoca5 fail silently. To fix this
+ # remove that menu if it exists.
+ rm -fv ''${XDG_CONFIG_HOME}/menus/applications-merged/xdg-desktop-menu-dummy.menu
+
+ # Qt writes a weird ‘libraryPath’ line to
+ # ~/.config/Trolltech.conf that causes the KDE plugin
+ # paths of previous KDE invocations to be searched.
+ # Obviously using mismatching KDE libraries is potentially
+ # disastrous, so here we nuke references to the Nix store
+ # in Trolltech.conf. A better solution would be to stop
+ # Qt from doing this wackiness in the first place.
+ trolltech_conf="''${XDG_CONFIG_HOME}/Trolltech.conf"
+ if [ -e "$trolltech_conf" ]; then
+ ${sed} -i "$trolltech_conf" -e '/nix\\store\|nix\/store/ d'
+ fi
+
+ # Remove the kbuildsyscoca5 cache. It will be regenerated
+ # immediately after. This is necessary for kbuildsyscoca5 to
+ # recognize that software that has been removed.
+ rm -fv $HOME/.cache/ksycoca*
+
+ ${pkgs.libsForQt5.kservice}/bin/kbuildsycoca5
+ '';
+
+ set_XDG_CONFIG_HOME = ''
+ # Set the default XDG_CONFIG_HOME if it is unset.
+ # Per the XDG Base Directory Specification:
+ # https://specifications.freedesktop.org/basedir-spec/latest
+ # 1. Never export this variable! If it is unset, then child processes are
+ # expected to set the default themselves.
+ # 2. Contaminate / if $HOME is unset; do not check if $HOME is set.
+ XDG_CONFIG_HOME=''${XDG_CONFIG_HOME:-$HOME/.config}
+ '';
+
+ startplasma =
+ ''
+ ${set_XDG_CONFIG_HOME}
+ mkdir -p "''${XDG_CONFIG_HOME}"
+
+ ''
+ + optionalString pulseaudio.enable ''
+ # Load PulseAudio module for routing support.
+ # See also: http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/
+ ${pactl} load-module module-device-manager "do_routing=1"
+
+ ''
+ + ''
+ ${activationScript}
+
+ # Create default configurations if Plasma has never been started.
+ kdeglobals="''${XDG_CONFIG_HOME}/kdeglobals"
+ if ! [ -f "$kdeglobals" ]
+ then
+ kcminputrc="''${XDG_CONFIG_HOME}/kcminputrc"
+ if ! [ -f "$kcminputrc" ]
+ then
+ cat ${kcminputrc} >"$kcminputrc"
+ fi
+
+ gtkrc2="$HOME/.gtkrc-2.0"
+ if ! [ -f "$gtkrc2" ]
+ then
+ cat ${gtkrc2} >"$gtkrc2"
+ fi
+
+ gtk3_settings="''${XDG_CONFIG_HOME}/gtk-3.0/settings.ini"
+ if ! [ -f "$gtk3_settings" ]
+ then
+ mkdir -p "$(dirname "$gtk3_settings")"
+ cat ${gtk3_settings} >"$gtk3_settings"
+ fi
+ fi
+
+ ''
+ + ''
+ exec "${startplasma-x11}"
+ '';
in
@@ -41,27 +172,7 @@ in
services.xserver.desktopManager.session = singleton {
name = "plasma5";
bgSupport = true;
- start = ''
- # Load PulseAudio module for routing support.
- # See http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/
- ${optionalString config.hardware.pulseaudio.enable ''
- ${getBin config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
- ''}
-
- if [ -f "$HOME/.config/kdeglobals" ]
- then
- # Remove extraneous font style names.
- # See also: https://phabricator.kde.org/D9070
- ${getBin pkgs.gnused}/bin/sed -i "$HOME/.config/kdeglobals" \
- -e '/^fixed=/ s/,Regular$//' \
- -e '/^font=/ s/,Regular$//' \
- -e '/^menuFont=/ s/,Regular$//' \
- -e '/^smallestReadableFont=/ s/,Regular$//' \
- -e '/^toolBarFont=/ s/,Regular$//'
- fi
-
- exec "${getBin plasma5.plasma-workspace}/bin/startkde"
- '';
+ start = startplasma;
};
security.wrappers = {
@@ -137,6 +248,7 @@ in
libkscreen
libksysguard
milou
+ plasma-browser-integration
plasma-integration
polkit-kde-agent
systemsettings
@@ -226,29 +338,7 @@ in
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ];
# Update the start menu for each user that is currently logged in
- system.userActivationScripts.plasmaSetup = ''
- # The KDE icon cache is supposed to update itself
- # automatically, but it uses the timestamp on the icon
- # theme directory as a trigger. Since in Nix the
- # timestamp is always the same, this doesn't work. So as
- # a workaround, nuke the icon cache on login. This isn't
- # perfect, since it may require logging out after
- # installing new applications to update the cache.
- # See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html
- rm -fv $HOME/.cache/icon-cache.kcache
-
- # xdg-desktop-settings generates this empty file but
- # it makes kbuildsyscoca5 fail silently. To fix this
- # remove that menu if it exists.
- rm -fv $HOME/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu
-
- # Remove the kbuildsyscoca5 cache. It will be regenerated
- # immediately after. This is necessary for kbuildsyscoca5 to
- # recognize that software that has been removed.
- rm -fv $HOME/.cache/ksycoca*
-
- ${pkgs.libsForQt5.kservice}/bin/kbuildsycoca5
- '';
+ system.userActivationScripts.plasmaSetup = activationScript;
})
];
diff --git a/nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix
index 21f59074f3a..a08b1947f65 100644
--- a/nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixpkgs/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -127,9 +127,14 @@ in
"/share/gtksourceview-4.0"
];
- services.xserver.displayManager.sessionPackages = [
- pkgs.xfce.xfce4-session
- ];
+ services.xserver.desktopManager.session = [{
+ name = "xfce";
+ bgSupport = true;
+ start = ''
+ ${pkgs.runtimeShell} ${pkgs.xfce.xfce4-session.xinitrc} &
+ waitPID=$!
+ '';
+ }];
services.xserver.updateDbusEnvironment = true;
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/default.nix b/nixpkgs/nixos/modules/services/x11/display-managers/default.nix
index 1efd0739376..5d49ca94387 100644
--- a/nixpkgs/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixpkgs/nixos/modules/services/x11/display-managers/default.nix
@@ -141,9 +141,11 @@ let
'';
dmDefault = cfg.desktopManager.default;
+ # fallback default for cases when only default wm is set
+ dmFallbackDefault = if dmDefault != null then dmDefault else "none";
wmDefault = cfg.windowManager.default;
- defaultSessionFromLegacyOptions = concatStringsSep "+" (filter (s: s != null) ([ dmDefault ] ++ optional (wmDefault != "none") wmDefault));
+ defaultSessionFromLegacyOptions = dmFallbackDefault + optionalString (wmDefault != null && wmDefault != "none") "+${wmDefault}";
in
@@ -358,7 +360,7 @@ in
{ c = wmDefault; t = "- services.xserver.windowManager.default"; }
]))}
Please use
- services.xserver.displayManager.defaultSession = "${concatStringsSep "+" (filter (s: s != null) [ dmDefault wmDefault ])}";
+ services.xserver.displayManager.defaultSession = "${defaultSessionFromLegacyOptions}";
instead.
''
];
@@ -425,6 +427,7 @@ in
TryExec=${script}
Exec=${script}
Name=${sessionName}
+ DesktopNames=${sessionName}
'';
} // {
providedSessions = [ sessionName ];
diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix b/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix
index 325023f4121..e0ac47bb766 100644
--- a/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix
+++ b/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix
@@ -166,9 +166,10 @@ in
};
systemd.tmpfiles.rules = [
- "d /run/gdm/.config 0711 gdm gdm -"
+ "d /run/gdm/.config 0711 gdm gdm"
] ++ optionals config.hardware.pulseaudio.enable [
- "L+ /run/gdm/.config/pulse - - - - ${pulseConfig}"
+ "d /run/gdm/.config/pulse 0711 gdm gdm"
+ "L+ /run/gdm/.config/pulse/${pulseConfig.name} - - - - ${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"
diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix
new file mode 100644
index 00000000000..a9ba8e6280d
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix
@@ -0,0 +1,92 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ dmcfg = config.services.xserver.displayManager;
+ ldmcfg = dmcfg.lightdm;
+ cfg = ldmcfg.greeters.tiny;
+
+in
+{
+ options = {
+
+ services.xserver.displayManager.lightdm.greeters.tiny = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to enable lightdm-tiny-greeter as the lightdm greeter.
+
+ Note that this greeter starts only the default X session.
+ You can configure the default X session using
+ <xref linkend="opt-services.xserver.displayManager.defaultSession"/>.
+ '';
+ };
+
+ label = {
+ user = mkOption {
+ type = types.str;
+ default = "Username";
+ description = ''
+ The string to represent the user_text label.
+ '';
+ };
+
+ pass = mkOption {
+ type = types.str;
+ default = "Password";
+ description = ''
+ The string to represent the pass_text label.
+ '';
+ };
+ };
+
+
+ extraConfig = mkOption {
+ type = types.lines;
+ default = "";
+ description = ''
+ Section to describe style and ui.
+ '';
+ };
+
+ };
+
+ };
+
+ config = mkIf (ldmcfg.enable && cfg.enable) {
+
+ services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
+
+ nixpkgs.config.lightdm-tiny-greeter.conf =
+ let
+ configHeader = ''
+ #include <gtk/gtk.h>
+ static const char *user_text = "${cfg.label.user}";
+ static const char *pass_text = "${cfg.label.pass}";
+ static const char *session = "${dmcfg.defaultSession}";
+ '';
+ in
+ optionalString (cfg.extraConfig != "")
+ (configHeader + cfg.extraConfig);
+
+ services.xserver.displayManager.lightdm.greeter =
+ mkDefault {
+ package = pkgs.lightdm-tiny-greeter.xgreeters;
+ name = "lightdm-tiny-greeter";
+ };
+
+ assertions = [
+ {
+ assertion = dmcfg.defaultSession != null;
+ message = ''
+ Please set: services.xserver.displayManager.defaultSession
+ '';
+ }
+ ];
+
+ };
+}
diff --git a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix
index f7face0adb7..cb7b5f95958 100644
--- a/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix
+++ b/nixpkgs/nixos/modules/services/x11/display-managers/lightdm.nix
@@ -77,6 +77,7 @@ in
./lightdm-greeters/mini.nix
./lightdm-greeters/enso-os.nix
./lightdm-greeters/pantheon.nix
+ ./lightdm-greeters/tiny.nix
];
options = {
diff --git a/nixpkgs/nixos/modules/services/x11/unclutter.nix b/nixpkgs/nixos/modules/services/x11/unclutter.nix
index c0868604a68..56e30c79d1f 100644
--- a/nixpkgs/nixos/modules/services/x11/unclutter.nix
+++ b/nixpkgs/nixos/modules/services/x11/unclutter.nix
@@ -61,7 +61,7 @@ in {
serviceConfig.ExecStart = ''
${cfg.package}/bin/unclutter \
-idle ${toString cfg.timeout} \
- -jitter ${toString (cfg.threeshold - 1)} \
+ -jitter ${toString (cfg.threshold - 1)} \
${optionalString cfg.keystroke "-keystroke"} \
${concatMapStrings (x: " -"+x) cfg.extraOptions} \
-not ${concatStringsSep " " cfg.excluded} \
diff --git a/nixpkgs/nixos/modules/services/x11/urxvtd.nix b/nixpkgs/nixos/modules/services/x11/urxvtd.nix
index 9bfcfa9b065..867ac38a944 100644
--- a/nixpkgs/nixos/modules/services/x11/urxvtd.nix
+++ b/nixpkgs/nixos/modules/services/x11/urxvtd.nix
@@ -18,10 +18,10 @@ in {
};
package = mkOption {
- default = pkgs.rxvt_unicode-with-plugins;
- defaultText = "pkgs.rxvt_unicode-with-plugins";
+ default = pkgs.rxvt-unicode;
+ defaultText = "pkgs.rxvt-unicode";
description = ''
- Package to install. Usually pkgs.rxvt_unicode-with-plugins or pkgs.rxvt_unicode
+ Package to install. Usually pkgs.rxvt-unicode.
'';
type = types.package;
};
diff --git a/nixpkgs/nixos/modules/services/x11/xserver.nix b/nixpkgs/nixos/modules/services/x11/xserver.nix
index 7f0de96d208..74d702ea1c3 100644
--- a/nixpkgs/nixos/modules/services/x11/xserver.nix
+++ b/nixpkgs/nixos/modules/services/x11/xserver.nix
@@ -573,7 +573,7 @@ in
then { modules = [xorg.${"xf86video" + name}]; }
else null)
knownVideoDrivers;
- in optional (driver != null) ({ inherit name; modules = []; driverName = name; } // driver));
+ in optional (driver != null) ({ inherit name; modules = []; driverName = name; display = true; } // driver));
assertions = [
{ assertion = config.security.polkit.enable;
@@ -740,7 +740,7 @@ in
${cfg.serverLayoutSection}
# Reference the Screen sections for each driver. This will
# cause the X server to try each in turn.
- ${flip concatMapStrings cfg.drivers (d: ''
+ ${flip concatMapStrings (filter (d: d.display) cfg.drivers) (d: ''
Screen "Screen-${d.name}[0]"
'')}
EndSection
@@ -764,42 +764,44 @@ in
${driver.deviceSection or ""}
${xrandrDeviceSection}
EndSection
+ ${optionalString driver.display ''
+
+ Section "Screen"
+ Identifier "Screen-${driver.name}[0]"
+ Device "Device-${driver.name}[0]"
+ ${optionalString (cfg.monitorSection != "") ''
+ Monitor "Monitor[0]"
+ ''}
+
+ ${cfg.screenSection}
+ ${driver.screenSection or ""}
+
+ ${optionalString (cfg.defaultDepth != 0) ''
+ DefaultDepth ${toString cfg.defaultDepth}
+ ''}
+
+ ${optionalString
+ (driver.name != "virtualbox" &&
+ (cfg.resolutions != [] ||
+ cfg.extraDisplaySettings != "" ||
+ cfg.virtualScreen != null))
+ (let
+ f = depth:
+ ''
+ SubSection "Display"
+ Depth ${toString depth}
+ ${optionalString (cfg.resolutions != [])
+ "Modes ${concatMapStrings (res: ''"${toString res.x}x${toString res.y}"'') cfg.resolutions}"}
+ ${cfg.extraDisplaySettings}
+ ${optionalString (cfg.virtualScreen != null)
+ "Virtual ${toString cfg.virtualScreen.x} ${toString cfg.virtualScreen.y}"}
+ EndSubSection
+ '';
+ in concatMapStrings f [8 16 24]
+ )}
- Section "Screen"
- Identifier "Screen-${driver.name}[0]"
- Device "Device-${driver.name}[0]"
- ${optionalString (cfg.monitorSection != "") ''
- Monitor "Monitor[0]"
- ''}
-
- ${cfg.screenSection}
- ${driver.screenSection or ""}
-
- ${optionalString (cfg.defaultDepth != 0) ''
- DefaultDepth ${toString cfg.defaultDepth}
- ''}
-
- ${optionalString
- (driver.name != "virtualbox" &&
- (cfg.resolutions != [] ||
- cfg.extraDisplaySettings != "" ||
- cfg.virtualScreen != null))
- (let
- f = depth:
- ''
- SubSection "Display"
- Depth ${toString depth}
- ${optionalString (cfg.resolutions != [])
- "Modes ${concatMapStrings (res: ''"${toString res.x}x${toString res.y}"'') cfg.resolutions}"}
- ${cfg.extraDisplaySettings}
- ${optionalString (cfg.virtualScreen != null)
- "Virtual ${toString cfg.virtualScreen.x} ${toString cfg.virtualScreen.y}"}
- EndSubSection
- '';
- in concatMapStrings f [8 16 24]
- )}
-
- EndSection
+ EndSection
+ ''}
'')}
${xrandrMonitorSections}