diff --git a/nixos/modules/config/xdg/portals/lxqt.nix b/nixos/modules/config/xdg/portals/lxqt.nix
new file mode 100644
index 000000000000..e85e2cc32693
--- /dev/null
+++ b/nixos/modules/config/xdg/portals/lxqt.nix
@@ -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 lxqt.xdg-desktop-portal-lxqt
+ package (with the extra Qt styles) into the
+ 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
+ lxqt.xdg-desktop-portal-lxqt.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ xdg.portal = {
+ enable = true;
+ extraPortals = [
+ (pkgs.lxqt.xdg-desktop-portal-lxqt.override { extraQtStyles = cfg.styles; })
+ ];
+ };
+
+ environment.systemPackages = cfg.styles;
+ };
+}
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 034d6ba1f582..09f1aa5baaa3 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -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
diff --git a/nixos/modules/services/x11/desktop-managers/lxqt.nix b/nixos/modules/services/x11/desktop-managers/lxqt.nix
index 46f35f11b4a5..2aa9e5ab331d 100644
--- a/nixos/modules/services/x11/desktop-managers/lxqt.nix
+++ b/nixos/modules/services/x11/desktop-managers/lxqt.nix
@@ -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;
};
}