summaryrefslogtreecommitdiffstats
path: root/nixos/modules
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2016-11-18 11:29:47 -0600
committerGitHub <noreply@github.com>2016-11-18 11:29:47 -0600
commit6cd867dd4c72c27a02c8873494594259bc154943 (patch)
tree5d93e9204c9280e83d9175eec4e9002ea1593dda /nixos/modules
parente8bb0a5ef7e0f0d94bdb96ece9da8fffa25fe9cf (diff)
parent5ab9ad1ce274bf7c4db75eb049b567f39750338f (diff)
Merge pull request #20433 from ttuegel/install-cd-kde-5
Use KDE 5 for the graphical installation DVD
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix96
-rw-r--r--nixos/modules/services/x11/desktop-managers/kde5.nix24
2 files changed, 44 insertions, 76 deletions
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
index b5ee57d9e22e..c44dff3bb60d 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
+++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
@@ -1,20 +1,41 @@
# This module defines a NixOS installation CD that contains X11 and
-# KDE 4.
+# KDE 5.
{ config, lib, pkgs, ... }:
with lib;
{
- imports = [ ./installation-cd-base.nix ../../profiles/graphical.nix ];
+ imports = [ ./installation-cd-base.nix ];
- # Provide wicd for easy wireless configuration.
- #networking.wicd.enable = true;
+ services.xserver = {
+ enable = true;
+
+ # Automatically login as root.
+ displayManager.slim = {
+ enable = true;
+ defaultUser = "root";
+ autoLogin = true;
+ };
+
+ desktopManager.kde5 = {
+ enable = true;
+ enableQt4Support = false;
+ };
+
+ # Enable touchpad support for many laptops.
+ synaptics.enable = true;
+ };
environment.systemPackages =
- [ # Include gparted for partitioning disks.
+ [ pkgs.glxinfo
+
+ # Include gparted for partitioning disks.
pkgs.gparted
+ # Firefox for reading the manual.
+ pkgs.firefox
+
# Include some editors.
pkgs.vim
pkgs.bvi # binary editor
@@ -32,80 +53,21 @@ with lib;
# Don't start the X server by default.
services.xserver.autorun = mkForce false;
- # Auto-login as root.
- services.xserver.displayManager.kdm.extraConfig =
- ''
- [X-*-Core]
- AllowRootLogin=true
- AutoLoginEnable=true
- AutoLoginUser=root
- AutoLoginPass=""
- '';
-
- # Custom kde-workspace adding some icons on the desktop
-
system.activationScripts.installerDesktop = let
- openManual = pkgs.writeScript "nixos-manual.sh" ''
- #!${pkgs.stdenv.shell}
- cd ${config.system.build.manual.manual}/share/doc/nixos/
- konqueror ./index.html
- '';
-
desktopFile = pkgs.writeText "nixos-manual.desktop" ''
[Desktop Entry]
Version=1.0
Type=Application
Name=NixOS Manual
- Exec=${openManual}
- Icon=konqueror
+ Exec=firefox ${config.system.build.manual.manual}/share/doc/nixos/index.html
+ Icon=text-html
'';
in ''
mkdir -p /root/Desktop
ln -sfT ${desktopFile} /root/Desktop/nixos-manual.desktop
- ln -sfT ${pkgs.kde4.konsole}/share/applications/kde4/konsole.desktop /root/Desktop/konsole.desktop
+ ln -sfT ${pkgs.kde5.konsole}/share/applications/org.kde.konsole.desktop /root/Desktop/org.kde.konsole.desktop
ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop /root/Desktop/gparted.desktop
'';
- services.xserver.desktopManager.kde4.kdeWorkspacePackage = let
- pkg = pkgs.kde4.kde_workspace;
-
- plasmaInit = pkgs.writeText "00-defaultLayout.js" ''
- loadTemplate("org.kde.plasma-desktop.defaultPanel")
-
- for (var i = 0; i < screenCount; ++i) {
- var desktop = new Activity
- desktop.name = i18n("Desktop")
- desktop.screen = i
- desktop.wallpaperPlugin = 'image'
- desktop.wallpaperMode = 'SingleImage'
-
- var folderview = desktop.addWidget("folderview");
- folderview.writeConfig("url", "desktop:/");
-
- //Create more panels for other screens
- if (i > 0){
- var panel = new Panel
- panel.screen = i
- panel.location = 'bottom'
- panel.height = screenGeometry(i).height > 1024 ? 35 : 27
- var tasks = panel.addWidget("tasks")
- tasks.writeConfig("showOnlyCurrentScreen", true);
- }
- }
- '';
-
- in
- pkgs.runCommand pkg.name
- { inherit (pkg) meta; }
- ''
- mkdir -p $out
- cp -prf ${pkg}/* $out/
- chmod a+w $out/share/apps/plasma-desktop/init
- cp -f ${plasmaInit} $out/share/apps/plasma-desktop/init/00-defaultLayout.js
- '';
-
- # Disable large stuff that's not very useful on the installation CD.
- services.xserver.desktopManager.kde4.enablePIM = false;
-
}
diff --git a/nixos/modules/services/x11/desktop-managers/kde5.nix b/nixos/modules/services/x11/desktop-managers/kde5.nix
index bc010d1ce1cf..9b51b92faa4d 100644
--- a/nixos/modules/services/x11/desktop-managers/kde5.nix
+++ b/nixos/modules/services/x11/desktop-managers/kde5.nix
@@ -22,6 +22,15 @@ in
description = "Enable the Plasma 5 (KDE 5) desktop environment.";
};
+ enableQt4Support = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Enable support for Qt 4-based applications. Particularly, install the
+ Qt 4 version of the Breeze theme and a default backend for Phonon.
+ '';
+ };
+
};
};
@@ -105,7 +114,7 @@ in
kde5.sonnet
kde5.threadweaver
- kde5.breeze
+ kde5.breeze-qt5
kde5.kactivitymanagerd
kde5.kde-cli-tools
kde5.kdecoration
@@ -141,13 +150,12 @@ in
kde5.konsole
kde5.print-manager
- # Oxygen icons moved to KDE Frameworks 5.16 and later.
- (kde5.oxygen-icons or kde5.oxygen-icons5)
+ # Install Breeze icons if available
+ (kde5.breeze-icons or kde5.oxygen-icons5 or kde5.oxygen-icons)
pkgs.hicolor_icon_theme
- kde5.kde-gtk-config
+ kde5.kde-gtk-config kde5.breeze-gtk
- pkgs.phonon-backend-gstreamer
pkgs.qt5.phonon-backend-gstreamer
]
@@ -155,15 +163,14 @@ in
# If it is not available, Orion is very similar to Breeze.
++ lib.optional (!(lib.hasAttr "breeze-gtk" kde5)) pkgs.orion
- # Install Breeze icons if available
- ++ lib.optional (lib.hasAttr "breeze-icons" kde5) kde5.breeze-icons
-
# Install activity manager if available
++ lib.optional (lib.hasAttr "kactivitymanagerd" kde5) kde5.kactivitymanagerd
# frameworkintegration was split with plasma-integration in Plasma 5.6
++ lib.optional (lib.hasAttr "plasma-integration" kde5) kde5.plasma-integration
+ ++ lib.optionals cfg.enableQt4Support [ kde5.breeze-qt4 pkgs.phonon-backend-gstreamer ]
+
# Optional hardware support features
++ lib.optional config.hardware.bluetooth.enable kde5.bluedevil
++ lib.optional config.networking.networkmanager.enable kde5.plasma-nm
@@ -217,7 +224,6 @@ in
kde5.ecm # for the setup-hook
kde5.plasma-workspace
kde5.breeze-icons
- (kde5.oxygen-icons or kde5.oxygen-icons5)
];
};