1{
2 config,
3 pkgs,
4 lib,
5 ...
6}:
7let
8 cfg = config.xdg.portal.lxqt;
9
10in
11{
12 meta = {
13 maintainers = lib.teams.lxqt.members;
14 };
15
16 options.xdg.portal.lxqt = {
17 enable = lib.mkEnableOption ''
18 the desktop portal for the LXQt desktop environment.
19
20 This will add the `lxqt.xdg-desktop-portal-lxqt`
21 package (with the extra Qt styles) into the
22 {option}`xdg.portal.extraPortals` option
23 '';
24
25 styles = lib.mkOption {
26 type = lib.types.listOf lib.types.package;
27 default = [ ];
28 example = lib.literalExpression ''
29 [
30 pkgs.libsForQt5.qtstyleplugin-kvantum
31 pkgs.breeze-qt5
32 pkgs.qtcurve
33 ];
34 '';
35 description = ''
36 Extra Qt styles that will be available to the
37 `lxqt.xdg-desktop-portal-lxqt`.
38 '';
39 };
40 };
41
42 config = lib.mkIf cfg.enable {
43 xdg.portal = {
44 enable = true;
45 extraPortals = [
46 (pkgs.lxqt.xdg-desktop-portal-lxqt.override { extraQtStyles = cfg.styles; })
47 ];
48 };
49
50 environment.systemPackages = cfg.styles;
51 };
52}