Merge pull request #180992 from romildo/new.xdg.portal.lxqt

This commit is contained in:
Sandro
2022-07-13 14:15:09 +02:00
committed by GitHub
4 changed files with 56 additions and 3 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;
};
}

View File

@@ -4,8 +4,10 @@
, cmake
, kwindowsystem
, libfm-qt
, lxqt-qtplugin
, qtx11extras
, lxqtUpdateScript
, extraQtStyles ? []
}:
mkDerivation rec {
@@ -26,8 +28,10 @@ mkDerivation rec {
buildInputs = [
kwindowsystem
libfm-qt
lxqt-qtplugin
qtx11extras
];
]
++ extraQtStyles;
passthru.updateScript = lxqtUpdateScript { inherit pname version src; };