nixos/lxqt: add a module for the lxqt portal

This commit is contained in:
José Romildo 2022-07-10 12:28:51 -03:00
parent 3fd82bba7f
commit 7e30ebb2c2
3 changed files with 51 additions and 2 deletions

View File

@ -0,0 +1,49 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.xdg.portal.lxqt;
in
{
meta = {
maintainers = teams.lxqt.members;
};
options.xdg.portal.lxqt = {
enable = mkEnableOption ''
the desktop portal for the LXQt desktop environment.
This will add the <package>lxqt.xdg-desktop-portal-lxqt</package>
package (with the extra Qt styles) into the
<option>xdg.portal.extraPortals</option> option
'';
styles = mkOption {
type = types.listOf types.package;
default = [];
example = literalExpression ''[
pkgs.libsForQt5.qtstyleplugin-kvantum
pkgs.breeze-qt5
pkgs.qtcurve
];
'';
description = ''
Extra Qt styles that will be available to the
<package>lxqt.xdg-desktop-portal-lxqt</package>.
'';
};
};
config = mkIf cfg.enable {
xdg.portal = {
enable = true;
extraPortals = [
(pkgs.lxqt.xdg-desktop-portal-lxqt.override { extraQtStyles = cfg.styles; })
];
};
environment.systemPackages = cfg.styles;
};
}

View File

@ -10,6 +10,7 @@
./config/xdg/mime.nix
./config/xdg/portal.nix
./config/xdg/portals/wlr.nix
./config/xdg/portals/lxqt.nix
./config/appstream.nix
./config/console.nix
./config/xdg/sounds.nix

View File

@ -69,8 +69,7 @@ in
services.xserver.libinput.enable = mkDefault true;
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.lxqt.xdg-desktop-portal-lxqt ];
xdg.portal.lxqt.enable = true;
};
}