lxqt: better organize system packages

Split packages in three categories, all of them going into the system
package list:
- pre-requisite packages
- core packages
- optional packages

Add a new configuration option 'environment.lxqt.excludePackages' to
specify optional LXQt packages that should be excluded from system
packages.

Add 'gvfs' as a pre-requisite package, needed by 'pcmanfm-qt' to
handle virtual places, like "Computer" and "Network".
This commit is contained in:
romildo 2016-11-17 09:52:12 -02:00 committed by Bjørn Forsman
parent 63d930878b
commit 2e7105467b
2 changed files with 86 additions and 42 deletions

View File

@ -4,6 +4,14 @@ with lib;
let let
# Remove packages of ys from xs, based on their names
removePackagesByName = xs: ys:
let
pkgName = drv: (builtins.parseDrvName drv.name).name;
ysNames = map pkgName ys;
in
filter (x: !(builtins.elem (pkgName x) ysNames)) xs;
xcfg = config.services.xserver; xcfg = config.services.xserver;
cfg = xcfg.desktopManager.lxqt; cfg = xcfg.desktopManager.lxqt;
@ -18,8 +26,14 @@ in
description = "Enable the LXQt desktop manager"; description = "Enable the LXQt desktop manager";
}; };
environment.lxqt.excludePackages = mkOption {
default = [];
example = literalExample "[ pkgs.lxqt.qterminal ]";
type = types.listOf types.package;
description = "Which LXQt packages to exclude from the default environment";
}; };
};
config = mkIf (xcfg.enable && cfg.enable) { config = mkIf (xcfg.enable && cfg.enable) {
@ -31,47 +45,12 @@ in
''; '';
}; };
environment.systemPackages = [ environment.systemPackages =
pkgs.kde5.kwindowsystem # provides some QT5 plugins needed by lxqt-panel pkgs.lxqt.preRequisitePackages ++
pkgs.kde5.libkscreen # provides plugins for screen management software pkgs.lxqt.corePackages ++
pkgs.kde5.oxygen-icons5 # default icon theme (removePackagesByName
pkgs.libfm pkgs.lxqt.optionalPackages
pkgs.libfm-extra config.environment.lxqt.excludePackages);
pkgs.lxmenu-data
pkgs.lxqt.compton-conf
pkgs.lxqt.libfm-qt
pkgs.lxqt.liblxqt
pkgs.lxqt.libqtxdg
pkgs.lxqt.libsysstat
pkgs.lxqt.lximage-qt
pkgs.lxqt.lxqt-about
pkgs.lxqt.lxqt-admin
pkgs.lxqt.lxqt-common
pkgs.lxqt.lxqt-config
pkgs.lxqt.lxqt-globalkeys
pkgs.lxqt.lxqt-l10n
pkgs.lxqt.lxqt-notificationd
pkgs.lxqt.lxqt-openssh-askpass
pkgs.lxqt.lxqt-panel
pkgs.lxqt.lxqt-policykit
pkgs.lxqt.lxqt-powermanagement
pkgs.lxqt.lxqt-qtplugin
pkgs.lxqt.lxqt-runner
pkgs.lxqt.lxqt-session
pkgs.lxqt.lxqt-sudo
pkgs.lxqt.obconf-qt
pkgs.lxqt.pavucontrol-qt
pkgs.lxqt.pcmanfm-qt
pkgs.lxqt.qlipper
pkgs.lxqt.qps
pkgs.lxqt.qterminal
pkgs.lxqt.qtermwidget
pkgs.lxqt.screengrab
pkgs.menu-cache
pkgs.openbox # default window manager
pkgs.qt5.qtsvg # provides QT5 plugins for svg icons
pkgs.xscreensaver
];
# Link some extra directories in /run/current-system/software/share # Link some extra directories in /run/current-system/software/share
environment.pathsToLink = [ environment.pathsToLink = [
@ -80,5 +59,8 @@ in
"/share/lxqt" "/share/lxqt"
]; ];
environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.gvfs}/lib/gio/modules" ];
}; };
} }

View File

@ -63,6 +63,68 @@ let
screengrab = callPackage ./optional/screengrab { }; screengrab = callPackage ./optional/screengrab { };
qlipper = callPackage ./optional/qlipper { }; qlipper = callPackage ./optional/qlipper { };
preRequisitePackages = [
pkgs.gvfs # virtual file systems support for PCManFM-QT
pkgs.kde5.kwindowsystem # provides some QT5 plugins needed by lxqt-panel
pkgs.kde5.libkscreen # provides plugins for screen management software
pkgs.libfm
pkgs.libfm-extra
pkgs.lxmenu-data
pkgs.menu-cache
pkgs.openbox # default window manager
pkgs.qt5.qtsvg # provides QT5 plugins for svg icons
];
corePackages = [
### BASE
libqtxdg
libsysstat
liblxqt
### CORE 1
libfm-qt
lxqt-about
lxqt-admin
lxqt-common
lxqt-config
lxqt-globalkeys
lxqt-l10n
lxqt-notificationd
lxqt-openssh-askpass
lxqt-policykit
lxqt-powermanagement
lxqt-qtplugin
lxqt-session
lxqt-sudo
pavucontrol-qt
### CORE 2
lxqt-panel
lxqt-runner
pcmanfm-qt
];
optionalPackages = [
### LXQt project
qterminal
compton-conf
obconf-qt
lximage-qt
### QtDesktop project
qps
screengrab
### Qlipper
qlipper
### Default icon theme
pkgs.kde5.oxygen-icons5
### Screen saver
pkgs.xscreensaver
];
}; };
in self in self