{ 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 { services.dbus.enable = true; xdg.portal = { enable = true; xdgOpenUsePortal = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; }; }; }