1 { config, lib, pkgs, utils, ... }:
6 xcfg = config.services.xserver;
7 cfg = xcfg.desktopManager.lxqt;
13 maintainers = teams.lxqt.members;
18 services.xserver.desktopManager.lxqt.enable = mkOption {
21 description = "Enable the LXQt desktop manager";
24 environment.lxqt.excludePackages = mkOption {
26 example = literalExpression "[ pkgs.lxqt.qterminal ]";
27 type = types.listOf types.package;
28 description = "Which LXQt packages to exclude from the default environment";
33 config = mkIf cfg.enable {
35 services.xserver.desktopManager.session = singleton {
39 # Upstream installs default configuration files in
40 # $prefix/share/lxqt instead of $prefix/etc/xdg, (arguably)
41 # giving distributors freedom to ship custom default
42 # configuration files more easily. In order to let the session
43 # manager find them the share subdirectory is added to the
44 # XDG_CONFIG_DIRS environment variable.
46 # For an explanation see
47 # https://github.com/lxqt/lxqt/issues/1521#issuecomment-405097453
49 export XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS''${XDG_CONFIG_DIRS:+:}${config.system.path}/share
51 exec ${pkgs.lxqt.lxqt-session}/bin/startlxqt
55 environment.systemPackages =
56 pkgs.lxqt.preRequisitePackages ++
57 pkgs.lxqt.corePackages ++
58 (utils.removePackagesByName
59 pkgs.lxqt.optionalPackages
60 config.environment.lxqt.excludePackages);
62 # Link some extra directories in /run/current-system/software/share
63 environment.pathsToLink = [ "/share" ];
65 programs.gnupg.agent.pinentryPackage = mkDefault pkgs.pinentry-qt;
67 # virtual file systems support for PCManFM-QT
68 services.gvfs.enable = true;
70 services.upower.enable = config.powerManagement.enable;
72 services.libinput.enable = mkDefault true;
74 xdg.portal.lxqt.enable = mkDefault true;
76 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050804
77 xdg.portal.config.lxqt.default = mkDefault [ "lxqt" "gtk" ];