{ config, lib, pkgs, ... }: let cfg = config.os.wm; in { imports = [ ./niri.nix ]; options.os.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-gnome pkgs.xdg-desktop-portal-gtk ]; config = { common.default = [ "gtk" ]; niri = { "org.freedesktop.impl.portal.ScreenCast" = [ "gnome" ]; "org.freedesktop.impl.portal.Screenshot" = [ "gnome" ]; "default" = [ "gtk" ]; }; }; }; }; }