modules/wayland: fix xdg portals
This commit is contained in:
parent
4fba84bc9d
commit
a337eabba2
2 changed files with 38 additions and 17 deletions
|
@ -1,5 +1,42 @@
|
|||
_: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkForce mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.lists) optional;
|
||||
in {
|
||||
imports = [
|
||||
./variables.nix
|
||||
];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
# Sets environment variable NIXOS_XDG_OPEN_USE_PORTAL to 1.
|
||||
# This will make xdg-open use the portal to open programs,
|
||||
# which resolves bugs involving programs opening inside FHS envs
|
||||
# or with unexpected env vars set from wrappers.
|
||||
# See #160923 for more info.
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals =
|
||||
[
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
]
|
||||
++ (
|
||||
optional config.programs.niri.enable
|
||||
pkgs.xdg-desktop-portal-gnome
|
||||
)
|
||||
++ (
|
||||
optional config.programs.hyprland.enable
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
);
|
||||
config = {
|
||||
common.default = mkIf config.programs.hyprland.enable ["*"];
|
||||
};
|
||||
configPackages = [
|
||||
pkgs.niri
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue