nixos-config/modules/workstation/desktop.nix

34 lines
594 B
Nix
Raw Normal View History

2024-04-11 20:15:47 +02:00
{
config,
lib,
pkgs,
2024-08-01 21:40:51 +02:00
machineProps,
2024-04-11 20:15:47 +02:00
...
}:
with lib;
let
2024-08-01 21:40:51 +02:00
anySwayUser =
if machineProps.enableHomeManager then
builtins.any (user: config.home-manager.users.${user}.my.desktop.sway.enable) (
builtins.attrNames config.my.users
)
else
false;
in
{
2024-08-01 21:40:51 +02:00
programs.sway = mkIf anySwayUser {
2024-04-07 16:55:08 +02:00
enable = true;
wrapperFeatures.gtk = true;
};
2024-08-01 21:40:51 +02:00
xdg.portal = mkIf anySwayUser {
enable = true;
2024-04-07 17:14:02 +02:00
xdgOpenUsePortal = true;
wlr.enable = true;
2024-04-07 17:14:02 +02:00
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-kde
];
};
}