29 lines
508 B
Nix
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
|
|
];
|
|
};
|
|
}
|