1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-10 02:36:54 +00:00
home-manager/tests/modules/misc/xdg/portal.nix

30 lines
1.2 KiB
Nix
Raw Normal View History

{ config, lib, realPkgs, ... }:
2023-11-27 16:14:31 -03:00
lib.mkIf config.test.enableBig {
xdg.portal = {
enable = true;
extraPortals =
[ realPkgs.xdg-desktop-portal-hyprland realPkgs.xdg-desktop-portal-wlr ];
configPackages = [ realPkgs.hyprland ];
2023-11-27 16:14:31 -03:00
config = { sway.default = [ "wlr" "gtk" ]; };
};
test.unstubs = [ (self: super: { inherit (realPkgs) xdg-desktop-portal; }) ];
2023-11-27 16:14:31 -03:00
nmt.script = ''
assertFileExists home-path/share/systemd/user/xdg-desktop-portal.service
assertFileExists home-path/share/systemd/user/xdg-desktop-portal-wlr.service
assertFileExists home-path/share/systemd/user/xdg-desktop-portal-hyprland.service
2023-11-27 16:14:31 -03:00
assertFileContent home-path/share/xdg-desktop-portal/portals/hyprland.portal \
${realPkgs.xdg-desktop-portal-hyprland}/share/xdg-desktop-portal/portals/hyprland.portal
assertFileContent home-path/share/xdg-desktop-portal/portals/wlr.portal \
${realPkgs.xdg-desktop-portal-wlr}/share/xdg-desktop-portal/portals/wlr.portal
2023-11-27 16:14:31 -03:00
assertFileContent home-path/share/xdg-desktop-portal/hyprland-portals.conf \
${realPkgs.hyprland}/share/xdg-desktop-portal/hyprland-portals.conf
assertFileContent home-files/.config/xdg-desktop-portal/sway-portals.conf \
2023-11-27 16:14:31 -03:00
${./sway-portals-expected.conf}
'';
}