git.iko.soy/typeable/nixpkgs
on master help sign in
nixos: update default cases from KDM/KDE4 to SDDM/KDE5
commitb12564cc1b8319b317d98df03fec8ba4bbf71877 authorGraham Christensen <graham@grahamc.com> dateThu 9 Feb 2017, 21:25 (10 years ago) parent4000489
12 files changed+43−54
nixos/doc/manual/configuration/modularity.xml+2−3 nixos/doc/manual/configuration/x-windows.xml+3−3 nixos/doc/manual/configuration/xfce.xml+2−2 nixos/doc/manual/development/option-declarations.xml+24−24 nixos/modules/installer/tools/nixos-generate-config.pl+2−2 nixos/modules/profiles/graphical.nix+2−2 nixos/modules/services/hardware/bluetooth.nix+1−1 nixos/modules/services/x11/display-managers/default.nix+1−1 nixos/modules/services/x11/terminal-server.nix+2−12 nixos/release.nix+2−2 nixos/tests/phabricator.nix+1−1 nixos/tests/trac.nix+1−1
nixos/doc/manual/configuration/modularity.xml+2−3
@@ -36,9 +36,8 @@ latter might look like this:
3636{ config, pkgs, ... }:
3737
3838{ services.xserver.enable = true;
39− services.xserver.displayManager.kdm.enable = true;
40− services.xserver.desktopManager.kde4.enable = true;
41− environment.systemPackages = [ pkgs.kde4.kscreensaver ];
39+ services.xserver.displayManager.sddm.enable = true;
40+ services.xserver.desktopManager.kde5.enable = true;
4241}
4342</programlisting>
4443
nixos/doc/manual/configuration/x-windows.xml+3−3
@@ -25,7 +25,7 @@ Otherwise, you can only log into a plain undecorated
2525<command>xterm</command> window. Thus you should pick one or more of
2626the following lines:
2727<programlisting>
28−services.xserver.desktopManager.kde4.enable = true;
28+services.xserver.desktopManager.kde5.enable = true;
2929services.xserver.desktopManager.xfce.enable = true;
3030services.xserver.windowManager.xmonad.enable = true;
3131services.xserver.windowManager.twm.enable = true;
@@ -35,9 +35,9 @@ services.xserver.windowManager.icewm.enable = true;
3535
3636<para>NixOS’s default <emphasis>display manager</emphasis> (the
3737program that provides a graphical login prompt and manages the X
38−server) is SLiM. You can select KDE’s <command>kdm</command> instead:
38+server) is SLiM. You can select KDE’s <command>sddm</command> instead:
3939<programlisting>
40−services.xserver.displayManager.kdm.enable = true;
40+services.xserver.displayManager.sddm.enable = true;
4141</programlisting>
4242</para>
4343
nixos/doc/manual/configuration/xfce.xml+2−2
@@ -41,9 +41,9 @@
4141 (DM is the program that provides a graphical login prompt
4242 and manages the X server.)
4343 You can, for example, select KDE’s
44− <command>kdm</command> instead:
44+ <command>sddm</command> instead:
4545 <programlisting>
46− services.xserver.displayManager.kdm.enable = true;
46+ services.xserver.displayManager.sddm.enable = true;
4747 </programlisting>
4848 </para>
4949
nixos/doc/manual/development/option-declarations.xml+24−24
@@ -65,22 +65,22 @@ options = {
6565
6666</para>
6767
68−<section xml:id="sec-option-declarations-eot"><title>Extensible Option
68+<section xml:id="sec-option-declarations-eot"><title>Extensible Option
6969 Types</title>
7070
71− <para>Extensible option types is a feature that allow to extend certain types
71+ <para>Extensible option types is a feature that allow to extend certain types
7272 declaration through multiple module files.
73− This feature only work with a restricted set of types, namely
73+ This feature only work with a restricted set of types, namely
7474 <literal>enum</literal> and <literal>submodules</literal> and any composed
7575 forms of them.</para>
7676
77− <para>Extensible option types can be used for <literal>enum</literal> options
78− that affects multiple modules, or as an alternative to related
77+ <para>Extensible option types can be used for <literal>enum</literal> options
78+ that affects multiple modules, or as an alternative to related
7979 <literal>enable</literal> options.</para>
8080
8181 <para>As an example, we will take the case of display managers. There is a
8282 central display manager module for generic display manager options and a
83− module file per display manager backend (slim, kdm, gdm ...).
83+ module file per display manager backend (slim, sddm, gdm ...).
8484 </para>
8585
8686 <para>There are two approach to this module structure:
@@ -96,7 +96,7 @@ options = {
9696 </para>
9797
9898 <para>Both approachs have problems.</para>
99−
99+
100100 <para>Making backends independent can quickly become hard to manage. For
101101 display managers, there can be only one enabled at a time, but the type
102102 system can not enforce this restriction as there is no relation between
@@ -108,18 +108,18 @@ options = {
108108 central module will require to change the central module option every time
109109 a new backend is added or removed.</para>
110110
111− <para>By using extensible option types, it is possible to create a placeholder
112− option in the central module (<xref linkend='ex-option-declaration-eot-service'
113− />), and to extend it in each backend module (<xref
114− linkend='ex-option-declaration-eot-backend-slim' />, <xref
115− linkend='ex-option-declaration-eot-backend-kdm' />).</para>
116−
111+ <para>By using extensible option types, it is possible to create a placeholder
112+ option in the central module (<xref linkend='ex-option-declaration-eot-service'
113+ />), and to extend it in each backend module (<xref
114+ linkend='ex-option-declaration-eot-backend-slim' />, <xref
115+ linkend='ex-option-declaration-eot-backend-sddm' />).</para>
116+
117117 <para>As a result, <literal>displayManager.enable</literal> option values can
118118 be added without changing the main service module file and the type system
119119 automatically enforce that there can only be a single display manager
120120 enabled.</para>
121121
122−<example xml:id='ex-option-declaration-eot-service'><title>Extensible type
122+<example xml:id='ex-option-declaration-eot-service'><title>Extensible type
123123 placeholder in the service module</title>
124124<screen>
125125services.xserver.displayManager.enable = mkOption {
@@ -127,29 +127,29 @@ services.xserver.displayManager.enable = mkOption {
127127 type = with types; nullOr (enum [ ]);
128128};</screen></example>
129129
130−<example xml:id='ex-option-declaration-eot-backend-slim'><title>Extending
131− <literal>services.xserver.displayManager.enable</literal> in the
130+<example xml:id='ex-option-declaration-eot-backend-slim'><title>Extending
131+ <literal>services.xserver.displayManager.enable</literal> in the
132132 <literal>slim</literal> module</title>
133133<screen>
134134services.xserver.displayManager.enable = mkOption {
135135 type = with types; nullOr (enum [ "slim" ]);
136136};</screen></example>
137137
138−<example xml:id='ex-option-declaration-eot-backend-kdm'><title>Extending
139− <literal>services.foo.backend</literal> in the <literal>kdm</literal>
138+<example xml:id='ex-option-declaration-eot-backend-sdm'><title>Extending
139+ <literal>services.foo.backend</literal> in the <literal>sdm</literal>
140140 module</title>
141141<screen>
142142services.xserver.displayManager.enable = mkOption {
143− type = with types; nullOr (enum [ "kdm" ]);
143+ type = with types; nullOr (enum [ "sddm" ]);
144144};</screen></example>
145145
146−<para>The placeholder declaration is a standard <literal>mkOption</literal>
147− declaration, but it is important that extensible option declarations only use
146+<para>The placeholder declaration is a standard <literal>mkOption</literal>
147+ declaration, but it is important that extensible option declarations only use
148148 the <literal>type</literal> argument.</para>
149149
150−<para>Extensible option types work with any of the composed variants of
151− <literal>enum</literal> such as
152− <literal>with types; nullOr (enum [ "foo" "bar" ])</literal>
150+<para>Extensible option types work with any of the composed variants of
151+ <literal>enum</literal> such as
152+ <literal>with types; nullOr (enum [ "foo" "bar" ])</literal>
153153 or <literal>with types; listOf (enum [ "foo" "bar" ])</literal>.</para>
154154
155155</section>
nixos/modules/installer/tools/nixos-generate-config.pl+2−2
@@ -607,8 +607,8 @@ $bootLoaderConfig
607607 # services.xserver.xkbOptions = "eurosign:e";
608608
609609 # Enable the KDE Desktop Environment.
610− # services.xserver.displayManager.kdm.enable = true;
611− # services.xserver.desktopManager.kde4.enable = true;
610+ # services.xserver.displayManager.sddm.enable = true;
611+ # services.xserver.desktopManager.kde5.enable = true;
612612
613613 # Define a user account. Don't forget to set a password with ‘passwd’.
614614 # users.extraUsers.guest = {
nixos/modules/profiles/graphical.nix+2−2
@@ -6,8 +6,8 @@
66{
77 services.xserver = {
88 enable = true;
9− displayManager.kdm.enable = true;
10− desktopManager.kde4.enable = true;
9+ displayManager.sddm.enable = true;
10+ desktopManager.kde5.enable = true;
1111 synaptics.enable = true; # for touchpad support on many laptops
1212 };
1313
nixos/modules/services/hardware/bluetooth.nix+1−1
@@ -22,7 +22,7 @@ in
2222 };
2323
2424 ###### implementation
25−
25+
2626 config = mkIf config.hardware.bluetooth.enable {
2727
2828 environment.systemPackages = [ bluez-bluetooth pkgs.openobex pkgs.obexftp ];
nixos/modules/services/x11/display-managers/default.nix+1−1
@@ -1,5 +1,5 @@
11# This module declares the options to define a *display manager*, the
2−# program responsible for handling X logins (such as xdm, kdm, gdb, or
2+# program responsible for handling X logins (such as xdm, gdb, or
33# SLiM). The display manager allows the user to select a *session
44# type*. When the user logs in, the display manager starts the
55# *session script* ("xsession" below) to launch the selected session
nixos/modules/services/x11/terminal-server.nix+2−12
@@ -16,18 +16,8 @@ with lib;
1616 services.xserver.enable = true;
1717 services.xserver.videoDrivers = [];
1818
19− # Enable KDM. Any display manager will do as long as it supports XDMCP.
20− services.xserver.displayManager.kdm.enable = true;
21− services.xserver.displayManager.kdm.enableXDMCP = true;
22− services.xserver.displayManager.kdm.extraConfig =
23− ''
24− [General]
25− # We're headless, so don't bother starting an X server.
26− StaticServers=
27−
28− [Xdmcp]
29− Xaccess=${pkgs.writeText "Xaccess" "localhost"}
30− '';
19+ # Enable GDM. Any display manager will do as long as it supports XDMCP.
20+ services.xserver.displayManager.gdm.enable = true;
3121
3222 systemd.sockets.terminal-server =
3323 { description = "Terminal Server Socket";
nixos/release.nix+2−2
@@ -325,8 +325,8 @@ in rec {
325325
326326 kde = makeClosure ({ pkgs, ... }:
327327 { services.xserver.enable = true;
328− services.xserver.displayManager.kdm.enable = true;
329− services.xserver.desktopManager.kde4.enable = true;
328+ services.xserver.displayManager.sddm.enable = true;
329+ services.xserver.desktopManager.kde5.enable = true;
330330 });
331331
332332 xfce = makeClosure ({ pkgs, ... }:
nixos/tests/phabricator.nix+1−1
@@ -54,7 +54,7 @@ import ./make-test.nix ({ pkgs, ... }: {
5454 client =
5555 { config, pkgs, ... }:
5656 { imports = [ ./common/x11.nix ];
57− services.xserver.desktopManager.kde4.enable = true;
57+ services.xserver.desktopManager.kde5.enable = true;
5858 };
5959 };
6060
nixos/tests/trac.nix+1−1
@@ -45,7 +45,7 @@ import ./make-test.nix ({ pkgs, ... }: {
4545 client =
4646 { config, pkgs, ... }:
4747 { imports = [ ./common/x11.nix ];
48− services.xserver.desktopManager.kde4.enable = true;
48+ services.xserver.desktopManager.kde5.enable = true;
4949 };
5050 };
5151