diff --git a/nixos/modules/services/x11/desktop-managers/lxqt.nix b/nixos/modules/services/x11/desktop-managers/lxqt.nix index c385e74dbb2f..89ad2882363d 100644 --- a/nixos/modules/services/x11/desktop-managers/lxqt.nix +++ b/nixos/modules/services/x11/desktop-managers/lxqt.nix @@ -4,6 +4,14 @@ with lib; 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; cfg = xcfg.desktopManager.lxqt; @@ -18,8 +26,14 @@ in 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) { @@ -31,47 +45,12 @@ in ''; }; - environment.systemPackages = [ - pkgs.kde5.kwindowsystem # provides some QT5 plugins needed by lxqt-panel - pkgs.kde5.libkscreen # provides plugins for screen management software - pkgs.kde5.oxygen-icons5 # default icon theme - pkgs.libfm - pkgs.libfm-extra - 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 - ]; + environment.systemPackages = + pkgs.lxqt.preRequisitePackages ++ + pkgs.lxqt.corePackages ++ + (removePackagesByName + pkgs.lxqt.optionalPackages + config.environment.lxqt.excludePackages); # Link some extra directories in /run/current-system/software/share environment.pathsToLink = [ @@ -80,5 +59,8 @@ in "/share/lxqt" ]; + environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.gvfs}/lib/gio/modules" ]; + }; + } diff --git a/pkgs/desktops/lxqt/default.nix b/pkgs/desktops/lxqt/default.nix index 76cde64494a3..d5f5194c48e4 100644 --- a/pkgs/desktops/lxqt/default.nix +++ b/pkgs/desktops/lxqt/default.nix @@ -63,6 +63,68 @@ let screengrab = callPackage ./optional/screengrab { }; 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