2022-04-15 01:41:22 +00:00
|
|
|
{ config, lib, pkgs, utils, ... }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
xcfg = config.services.xserver;
|
|
|
|
cfg = xcfg.desktopManager.lxqt;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2022-04-27 09:35:20 +00:00
|
|
|
meta = {
|
|
|
|
maintainers = teams.lxqt.members;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
options = {
|
|
|
|
|
|
|
|
services.xserver.desktopManager.lxqt.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = "Enable the LXQt desktop manager";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
environment.lxqt.excludePackages = mkOption {
|
|
|
|
default = [];
|
2021-10-06 13:57:05 +00:00
|
|
|
example = literalExpression "[ pkgs.lxqt.qterminal ]";
|
2020-04-24 23:36:52 +00:00
|
|
|
type = types.listOf types.package;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = "Which LXQt packages to exclude from the default environment";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
services.xserver.desktopManager.session = singleton {
|
|
|
|
name = "lxqt";
|
|
|
|
bgSupport = true;
|
|
|
|
start = ''
|
|
|
|
# Upstream installs default configuration files in
|
|
|
|
# $prefix/share/lxqt instead of $prefix/etc/xdg, (arguably)
|
|
|
|
# giving distributors freedom to ship custom default
|
|
|
|
# configuration files more easily. In order to let the session
|
|
|
|
# manager find them the share subdirectory is added to the
|
|
|
|
# XDG_CONFIG_DIRS environment variable.
|
|
|
|
#
|
|
|
|
# For an explanation see
|
|
|
|
# https://github.com/lxqt/lxqt/issues/1521#issuecomment-405097453
|
|
|
|
#
|
|
|
|
export XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS''${XDG_CONFIG_DIRS:+:}${config.system.path}/share
|
|
|
|
|
|
|
|
exec ${pkgs.lxqt.lxqt-session}/bin/startlxqt
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages =
|
|
|
|
pkgs.lxqt.preRequisitePackages ++
|
|
|
|
pkgs.lxqt.corePackages ++
|
2022-04-15 01:41:22 +00:00
|
|
|
(utils.removePackagesByName
|
2020-04-24 23:36:52 +00:00
|
|
|
pkgs.lxqt.optionalPackages
|
|
|
|
config.environment.lxqt.excludePackages);
|
|
|
|
|
|
|
|
# Link some extra directories in /run/current-system/software/share
|
|
|
|
environment.pathsToLink = [ "/share" ];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
programs.gnupg.agent.pinentryPackage = mkDefault pkgs.pinentry-qt;
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
# virtual file systems support for PCManFM-QT
|
2020-04-24 23:36:52 +00:00
|
|
|
services.gvfs.enable = true;
|
|
|
|
|
|
|
|
services.upower.enable = config.powerManagement.enable;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
services.libinput.enable = mkDefault true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
xdg.portal.lxqt.enable = mkDefault true;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050804
|
|
|
|
xdg.portal.config.lxqt.default = mkDefault [ "lxqt" "gtk" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|