nixos-config/modules/workstation/desktop.nix

18 lines
379 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.enable = usersHasSway;
xdg.portal = mkIf usersHasSway {
enable = true;
wlr.enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
}