1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00
home-manager/tests/modules/misc/xdg/portal.nix

28 lines
1.1 KiB
Nix
Raw Normal View History

2023-11-27 20:14:31 +01:00
{ config, lib, pkgs, ... }:
lib.mkIf config.test.enableBig {
xdg.portal = {
enable = true;
extraPortals =
[ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-wlr ];
configPackages = [ pkgs.hyprland ];
config = { sway.default = [ "wlr" "gtk" ]; };
};
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 20:14:31 +01:00
assertFileContent home-path/share/xdg-desktop-portal/portals/hyprland.portal \
2023-11-27 20:14:31 +01:00
${pkgs.xdg-desktop-portal-hyprland}/share/xdg-desktop-portal/portals/hyprland.portal
assertFileContent home-path/share/xdg-desktop-portal/portals/wlr.portal \
2023-11-27 20:14:31 +01:00
${pkgs.xdg-desktop-portal-wlr}/share/xdg-desktop-portal/portals/wlr.portal
assertFileContent home-path/share/xdg-desktop-portal/hyprland-portals.conf \
2023-11-27 20:14:31 +01:00
${pkgs.hyprland}/share/xdg-desktop-portal/hyprland-portals.conf
assertFileContent home-files/.config/xdg-desktop-portal/sway-portals.conf \
2023-11-27 20:14:31 +01:00
${./sway-portals-expected.conf}
'';
}