kde5 service: use flattening kdeWrapper

This commit is contained in:
Nikolay Amiantov 2016-12-28 16:53:19 +03:00
parent e908442693
commit 1dceb2290c

View File

@ -31,12 +31,25 @@ in
''; '';
}; };
extraPackages = mkOption {
type = types.listOf types.package;
default = [];
description = ''
KDE packages that need to be installed system-wide.
'';
};
}; };
}; };
config = mkIf (xcfg.enable && cfg.enable) { config = mkMerge [
(mkIf (cfg.extraPackages != []) {
environment.systemPackages = [ (kde5.kdeWrapper cfg.extraPackages) ];
})
(mkIf (xcfg.enable && cfg.enable) {
warnings = optional config.services.xserver.desktopManager.kde4.enable warnings = optional config.services.xserver.desktopManager.kde4.enable
"KDE 4 should not be enabled at the same time as KDE 5"; "KDE 4 should not be enabled at the same time as KDE 5";
@ -120,7 +133,6 @@ in
kde5.kdecoration kde5.kdecoration
kde5.kdeplasma-addons kde5.kdeplasma-addons
kde5.kgamma5 kde5.kgamma5
kde5.khelpcenter
kde5.khotkeys kde5.khotkeys
kde5.kinfocenter kde5.kinfocenter
kde5.kmenuedit kde5.kmenuedit
@ -133,7 +145,6 @@ in
kde5.libkscreen kde5.libkscreen
kde5.libksysguard kde5.libksysguard
kde5.milou kde5.milou
kde5.oxygen
kde5.plasma-integration kde5.plasma-integration
kde5.polkit-kde-agent kde5.polkit-kde-agent
kde5.systemsettings kde5.systemsettings
@ -142,12 +153,10 @@ in
kde5.plasma-workspace kde5.plasma-workspace
kde5.plasma-workspace-wallpapers kde5.plasma-workspace-wallpapers
kde5.dolphin
kde5.dolphin-plugins kde5.dolphin-plugins
kde5.ffmpegthumbs kde5.ffmpegthumbs
kde5.kdegraphics-thumbnailers kde5.kdegraphics-thumbnailers
kde5.kio-extras kde5.kio-extras
kde5.konsole
kde5.print-manager kde5.print-manager
# Install Breeze icons if available # Install Breeze icons if available
@ -179,6 +188,15 @@ in
++ lib.optional config.services.colord.enable pkgs.colord-kde ++ lib.optional config.services.colord.enable pkgs.colord-kde
++ lib.optionals config.services.samba.enable [ kde5.kdenetwork-filesharing pkgs.samba ]; ++ lib.optionals config.services.samba.enable [ kde5.kdenetwork-filesharing pkgs.samba ];
services.xserver.desktopManager.kde5.extraPackages =
[
kde5.khelpcenter
kde5.oxygen
kde5.dolphin
kde5.konsole
];
environment.pathsToLink = [ "/share" ]; environment.pathsToLink = [ "/share" ];
environment.etc = singleton { environment.etc = singleton {
@ -186,9 +204,9 @@ in
target = "X11/xkb"; target = "X11/xkb";
}; };
# Enable GTK applications to load SVG icons
environment.variables = environment.variables =
{ {
# Enable GTK applications to load SVG icons
GST_PLUGIN_SYSTEM_PATH_1_0 = GST_PLUGIN_SYSTEM_PATH_1_0 =
lib.makeSearchPath "/lib/gstreamer-1.0" lib.makeSearchPath "/lib/gstreamer-1.0"
(builtins.map (pkg: pkg.out) (with pkgs.gst_all_1; [ (builtins.map (pkg: pkg.out) (with pkgs.gst_all_1; [
@ -229,6 +247,7 @@ in
security.pam.services.kde = { allowNullPassword = true; }; security.pam.services.kde = { allowNullPassword = true; };
}; })
];
} }