From b12564cc1b8319b317d98df03fec8ba4bbf71877 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 9 Feb 2017 21:25:03 -0500 Subject: [PATCH] nixos: update default cases from KDM/KDE4 to SDDM/KDE5 --- nixos/doc/manual/configuration/modularity.xml | 5 +- nixos/doc/manual/configuration/x-windows.xml | 6 +-- nixos/doc/manual/configuration/xfce.xml | 4 +- .../development/option-declarations.xml | 48 +++++++++---------- .../installer/tools/nixos-generate-config.pl | 4 +- nixos/modules/profiles/graphical.nix | 4 +- nixos/modules/services/hardware/bluetooth.nix | 2 +- .../services/x11/display-managers/default.nix | 2 +- .../modules/services/x11/terminal-server.nix | 14 +----- nixos/release.nix | 4 +- nixos/tests/phabricator.nix | 2 +- nixos/tests/trac.nix | 2 +- 12 files changed, 43 insertions(+), 54 deletions(-) diff --git a/nixos/doc/manual/configuration/modularity.xml b/nixos/doc/manual/configuration/modularity.xml index 59a4e3b33ba1..30da064ac579 100644 --- a/nixos/doc/manual/configuration/modularity.xml +++ b/nixos/doc/manual/configuration/modularity.xml @@ -36,9 +36,8 @@ latter might look like this: { config, pkgs, ... }: { services.xserver.enable = true; - services.xserver.displayManager.kdm.enable = true; - services.xserver.desktopManager.kde4.enable = true; - environment.systemPackages = [ pkgs.kde4.kscreensaver ]; + services.xserver.displayManager.sddm.enable = true; + services.xserver.desktopManager.kde5.enable = true; } diff --git a/nixos/doc/manual/configuration/x-windows.xml b/nixos/doc/manual/configuration/x-windows.xml index 3040839861c1..93d10d19b208 100644 --- a/nixos/doc/manual/configuration/x-windows.xml +++ b/nixos/doc/manual/configuration/x-windows.xml @@ -25,7 +25,7 @@ Otherwise, you can only log into a plain undecorated xterm window. Thus you should pick one or more of the following lines: -services.xserver.desktopManager.kde4.enable = true; +services.xserver.desktopManager.kde5.enable = true; services.xserver.desktopManager.xfce.enable = true; services.xserver.windowManager.xmonad.enable = true; services.xserver.windowManager.twm.enable = true; @@ -35,9 +35,9 @@ services.xserver.windowManager.icewm.enable = true; NixOS’s default display manager (the program that provides a graphical login prompt and manages the X -server) is SLiM. You can select KDE’s kdm instead: +server) is SLiM. You can select KDE’s sddm instead: -services.xserver.displayManager.kdm.enable = true; +services.xserver.displayManager.sddm.enable = true; diff --git a/nixos/doc/manual/configuration/xfce.xml b/nixos/doc/manual/configuration/xfce.xml index 7b60493e9df5..af6278e9c920 100644 --- a/nixos/doc/manual/configuration/xfce.xml +++ b/nixos/doc/manual/configuration/xfce.xml @@ -41,9 +41,9 @@ (DM is the program that provides a graphical login prompt and manages the X server.) You can, for example, select KDE’s - kdm instead: + sddm instead: - services.xserver.displayManager.kdm.enable = true; + services.xserver.displayManager.sddm.enable = true; diff --git a/nixos/doc/manual/development/option-declarations.xml b/nixos/doc/manual/development/option-declarations.xml index ce432a7fa6ca..cab721f2e555 100644 --- a/nixos/doc/manual/development/option-declarations.xml +++ b/nixos/doc/manual/development/option-declarations.xml @@ -65,22 +65,22 @@ options = { -
Extensible Option +<section xml:id="sec-option-declarations-eot"><title>Extensible Option Types - Extensible option types is a feature that allow to extend certain types + Extensible option types is a feature that allow to extend certain types declaration through multiple module files. - This feature only work with a restricted set of types, namely + This feature only work with a restricted set of types, namely enum and submodules and any composed forms of them. - Extensible option types can be used for enum options - that affects multiple modules, or as an alternative to related + Extensible option types can be used for enum options + that affects multiple modules, or as an alternative to related enable options. As an example, we will take the case of display managers. There is a central display manager module for generic display manager options and a - module file per display manager backend (slim, kdm, gdm ...). + module file per display manager backend (slim, sddm, gdm ...). There are two approach to this module structure: @@ -96,7 +96,7 @@ options = { Both approachs have problems. - + Making backends independent can quickly become hard to manage. For display managers, there can be only one enabled at a time, but the type system can not enforce this restriction as there is no relation between @@ -108,18 +108,18 @@ options = { central module will require to change the central module option every time a new backend is added or removed. - By using extensible option types, it is possible to create a placeholder - option in the central module (), and to extend it in each backend module (, ). - + By using extensible option types, it is possible to create a placeholder + option in the central module (), and to extend it in each backend module (, ). + As a result, displayManager.enable option values can be added without changing the main service module file and the type system automatically enforce that there can only be a single display manager enabled. -Extensible type +<example xml:id='ex-option-declaration-eot-service'><title>Extensible type placeholder in the service module services.xserver.displayManager.enable = mkOption { @@ -127,29 +127,29 @@ services.xserver.displayManager.enable = mkOption { type = with types; nullOr (enum [ ]); }; -Extending - <literal>services.xserver.displayManager.enable</literal> in the +<example xml:id='ex-option-declaration-eot-backend-slim'><title>Extending + <literal>services.xserver.displayManager.enable</literal> in the <literal>slim</literal> module services.xserver.displayManager.enable = mkOption { type = with types; nullOr (enum [ "slim" ]); }; -Extending - <literal>services.foo.backend</literal> in the <literal>kdm</literal> +<example xml:id='ex-option-declaration-eot-backend-sdm'><title>Extending + <literal>services.foo.backend</literal> in the <literal>sdm</literal> module services.xserver.displayManager.enable = mkOption { - type = with types; nullOr (enum [ "kdm" ]); + type = with types; nullOr (enum [ "sddm" ]); }; -The placeholder declaration is a standard mkOption - declaration, but it is important that extensible option declarations only use +The placeholder declaration is a standard mkOption + declaration, but it is important that extensible option declarations only use the type argument. -Extensible option types work with any of the composed variants of - enum such as - with types; nullOr (enum [ "foo" "bar" ]) +Extensible option types work with any of the composed variants of + enum such as + with types; nullOr (enum [ "foo" "bar" ]) or with types; listOf (enum [ "foo" "bar" ]).
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index c920a2b52d89..48f6cc76e4aa 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -607,8 +607,8 @@ $bootLoaderConfig # services.xserver.xkbOptions = "eurosign:e"; # Enable the KDE Desktop Environment. - # services.xserver.displayManager.kdm.enable = true; - # services.xserver.desktopManager.kde4.enable = true; + # services.xserver.displayManager.sddm.enable = true; + # services.xserver.desktopManager.kde5.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. # users.extraUsers.guest = { diff --git a/nixos/modules/profiles/graphical.nix b/nixos/modules/profiles/graphical.nix index 8ee1628f876c..73dd2d4bc9f7 100644 --- a/nixos/modules/profiles/graphical.nix +++ b/nixos/modules/profiles/graphical.nix @@ -6,8 +6,8 @@ { services.xserver = { enable = true; - displayManager.kdm.enable = true; - desktopManager.kde4.enable = true; + displayManager.sddm.enable = true; + desktopManager.kde5.enable = true; synaptics.enable = true; # for touchpad support on many laptops }; diff --git a/nixos/modules/services/hardware/bluetooth.nix b/nixos/modules/services/hardware/bluetooth.nix index f6cf2d01d809..ef2fce613f20 100644 --- a/nixos/modules/services/hardware/bluetooth.nix +++ b/nixos/modules/services/hardware/bluetooth.nix @@ -22,7 +22,7 @@ in }; ###### implementation - + config = mkIf config.hardware.bluetooth.enable { environment.systemPackages = [ bluez-bluetooth pkgs.openobex pkgs.obexftp ]; diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index c0daf30d04eb..98d2d0ea834d 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -1,5 +1,5 @@ # This module declares the options to define a *display manager*, the -# program responsible for handling X logins (such as xdm, kdm, gdb, or +# program responsible for handling X logins (such as xdm, gdb, or # 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 diff --git a/nixos/modules/services/x11/terminal-server.nix b/nixos/modules/services/x11/terminal-server.nix index 785394d9648c..09a7f386876f 100644 --- a/nixos/modules/services/x11/terminal-server.nix +++ b/nixos/modules/services/x11/terminal-server.nix @@ -16,18 +16,8 @@ with lib; services.xserver.enable = true; services.xserver.videoDrivers = []; - # Enable KDM. Any display manager will do as long as it supports XDMCP. - services.xserver.displayManager.kdm.enable = true; - services.xserver.displayManager.kdm.enableXDMCP = true; - services.xserver.displayManager.kdm.extraConfig = - '' - [General] - # We're headless, so don't bother starting an X server. - StaticServers= - - [Xdmcp] - Xaccess=${pkgs.writeText "Xaccess" "localhost"} - ''; + # Enable GDM. Any display manager will do as long as it supports XDMCP. + services.xserver.displayManager.gdm.enable = true; systemd.sockets.terminal-server = { description = "Terminal Server Socket"; diff --git a/nixos/release.nix b/nixos/release.nix index 2d78a4db9736..0f298188c6c7 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -325,8 +325,8 @@ in rec { kde = makeClosure ({ pkgs, ... }: { services.xserver.enable = true; - services.xserver.displayManager.kdm.enable = true; - services.xserver.desktopManager.kde4.enable = true; + services.xserver.displayManager.sddm.enable = true; + services.xserver.desktopManager.kde5.enable = true; }); xfce = makeClosure ({ pkgs, ... }: diff --git a/nixos/tests/phabricator.nix b/nixos/tests/phabricator.nix index 3bf83ab66655..85faafd56899 100644 --- a/nixos/tests/phabricator.nix +++ b/nixos/tests/phabricator.nix @@ -54,7 +54,7 @@ import ./make-test.nix ({ pkgs, ... }: { client = { config, pkgs, ... }: { imports = [ ./common/x11.nix ]; - services.xserver.desktopManager.kde4.enable = true; + services.xserver.desktopManager.kde5.enable = true; }; }; diff --git a/nixos/tests/trac.nix b/nixos/tests/trac.nix index e7d9759ae0cc..0d56c564e182 100644 --- a/nixos/tests/trac.nix +++ b/nixos/tests/trac.nix @@ -45,7 +45,7 @@ import ./make-test.nix ({ pkgs, ... }: { client = { config, pkgs, ... }: { imports = [ ./common/x11.nix ]; - services.xserver.desktopManager.kde4.enable = true; + services.xserver.desktopManager.kde5.enable = true; }; };