diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-07-13 14:15:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 14:15:09 +0200 |
commit | a959a2cd26c581fe04266950933d67f26d89903e (patch) | |
tree | 9a55c0fc8a8a466f131de90159b99e5f9950751d /nixos/modules | |
parent | 64bc1e49bd6f64c3aa260f9b9e090668481892d2 (diff) | |
parent | 7e30ebb2c2b90dc866643c6409e1424f7e651baa (diff) | |
download | nixlib-a959a2cd26c581fe04266950933d67f26d89903e.tar nixlib-a959a2cd26c581fe04266950933d67f26d89903e.tar.gz nixlib-a959a2cd26c581fe04266950933d67f26d89903e.tar.bz2 nixlib-a959a2cd26c581fe04266950933d67f26d89903e.tar.lz nixlib-a959a2cd26c581fe04266950933d67f26d89903e.tar.xz nixlib-a959a2cd26c581fe04266950933d67f26d89903e.tar.zst nixlib-a959a2cd26c581fe04266950933d67f26d89903e.zip |
Merge pull request #180992 from romildo/new.xdg.portal.lxqt
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/config/xdg/portals/lxqt.nix | 49 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/lxqt.nix | 3 |
3 files changed, 51 insertions, 2 deletions
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 <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; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 3a06694130bc..268ebbf18dd7 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; }; } |