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;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc "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;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc "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" ];
|
|
|
|
|
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
|
|
|
|
|
|
|
services.xserver.libinput.enable = mkDefault true;
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
xdg.portal.lxqt.enable = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|