refactor(modules): organize module tree
This commit was merged in pull request #72.
This commit is contained in:
23
modules/desktop/session/portals.nix
Normal file
23
modules/desktop/session/portals.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ config, lib, ... }:
|
||||
# XDG desktop portal routing for in-app screen sharing and file dialogs.
|
||||
let
|
||||
cfg = config.modules.desktop.session.portals;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.session.portals.enable =
|
||||
lib.mkEnableOption "XDG desktop portals for in-app screen sharing and file dialogs";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# The backend packages arrive with the compositor, so only the routing is set
|
||||
# here.
|
||||
# Screen sharing, screenshots, and global shortcuts need the compositor's
|
||||
# own backend.
|
||||
# Everything else uses GTK.
|
||||
xdg.portal.config.common = {
|
||||
default = [ "gtk" ];
|
||||
"org.freedesktop.impl.portal.ScreenCast" = [ "hyprland" ];
|
||||
"org.freedesktop.impl.portal.Screenshot" = [ "hyprland" ];
|
||||
"org.freedesktop.impl.portal.GlobalShortcuts" = [ "hyprland" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user