# rtkit for pipewire
security.rtkit.enable = true;
# enable pipewire with wlr support
services.pipewire.enable = true;
xdg = {
portal = {
enable = true;
extraPortals = with pkgs; [
# wlroots specific
# use xdg-desktop-portal-gtk for gnome.
xdg-desktop-portal-wlr
];
# uncomment for gnome
# gtkUsePortal = true;
};
};
xdg.portal.wlr.settings = {
screencast = {
# set the output_name (this doesn't really matter)
output_name = "HDMI-A";
max_fps = 60;
chooser_type = "simple";
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
};
};
Make sure to install slurp which is used as a helper to choose the screen which should be shared.
You can test the screensharing on https://mozilla.github.io/webrtc-landing/gum_test.html