nixos-config/modules/workstation/desktop.nix
2024-04-07 17:20:28 +02:00

26 lines
511 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
];
};
}