2016-10-04 00:12:17 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
xcfg = config.services.xserver;
|
|
|
|
cfg = xcfg.desktopManager.lxqt;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.xserver.desktopManager.lxqt.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Enable the LXQt desktop manager";
|
|
|
|
};
|
|
|
|
|
2016-11-17 12:52:12 +01:00
|
|
|
environment.lxqt.excludePackages = mkOption {
|
|
|
|
default = [];
|
2021-10-03 18:06:03 +02:00
|
|
|
example = literalExpression "[ pkgs.lxqt.qterminal ]";
|
2016-11-17 12:52:12 +01:00
|
|
|
type = types.listOf types.package;
|
|
|
|
description = "Which LXQt packages to exclude from the default environment";
|
|
|
|
};
|
2016-10-04 00:12:17 +02:00
|
|
|
|
2016-11-17 12:52:12 +01:00
|
|
|
};
|
2016-10-04 00:12:17 +02:00
|
|
|
|
2019-05-13 06:12:00 +02:00
|
|
|
config = mkIf cfg.enable {
|
2016-10-04 00:12:17 +02:00
|
|
|
|
|
|
|
services.xserver.desktopManager.session = singleton {
|
|
|
|
name = "lxqt";
|
2016-11-11 11:04:59 +01:00
|
|
|
bgSupport = true;
|
2016-10-04 00:12:17 +02:00
|
|
|
start = ''
|
2018-07-28 00:59:45 +02:00
|
|
|
# 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
|
|
|
|
|
2017-11-02 03:14:46 +01:00
|
|
|
exec ${pkgs.lxqt.lxqt-session}/bin/startlxqt
|
2016-10-04 00:12:17 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2016-11-17 12:52:12 +01:00
|
|
|
environment.systemPackages =
|
|
|
|
pkgs.lxqt.preRequisitePackages ++
|
|
|
|
pkgs.lxqt.corePackages ++
|
2021-05-07 23:18:14 +02:00
|
|
|
(pkgs.gnome.removePackagesByName
|
2016-11-17 12:52:12 +01:00
|
|
|
pkgs.lxqt.optionalPackages
|
|
|
|
config.environment.lxqt.excludePackages);
|
2016-10-04 00:12:17 +02:00
|
|
|
|
|
|
|
# Link some extra directories in /run/current-system/software/share
|
2018-07-28 00:59:45 +02:00
|
|
|
environment.pathsToLink = [ "/share" ];
|
2016-10-04 00:12:17 +02:00
|
|
|
|
2021-04-28 15:56:59 +02:00
|
|
|
# virtual file systems support for PCManFM-QT
|
2019-08-20 01:00:12 +02:00
|
|
|
services.gvfs.enable = true;
|
2016-11-17 12:52:12 +01:00
|
|
|
|
2018-04-06 09:49:55 +02:00
|
|
|
services.upower.enable = config.powerManagement.enable;
|
2016-10-04 00:12:17 +02:00
|
|
|
};
|
2016-11-17 12:52:12 +01:00
|
|
|
|
2016-10-04 00:12:17 +02:00
|
|
|
}
|