nixos-config/modules/workstation/desktop.nix
2024-04-11 20:33:12 +02:00

29 lines
508 B
Nix

{
config,
lib,
pkgs,
...
}:
with lib;
let
usersHasSway = builtins.any (user: config.home-manager.users.${user}.desktop.enableSwayStack) (
builtins.attrNames config.machineUsers
);
in
{
programs.sway = mkIf usersHasSway {
enable = true;
wrapperFeatures.gtk = true;
};
xdg.portal = mkIf usersHasSway {
enable = true;
xdgOpenUsePortal = true;
wlr.enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-kde
];
};
}