{ config, lib, pkgs, ... }: let cfg = config.sys.wm; in { imports = [ ./niri.nix ]; options.sys.wm.enable = lib.mkEnableOption "enables shared wm features"; config = lib.mkIf (cfg.enable || cfg.niri.enable or false) { services.dbus.enable = true; xdg.portal = { enable = true; xdgOpenUsePortal = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; config.common.default = [ "gtk" ]; }; }; }