Fix screen sharing

This commit is contained in:
Andrea Ciceri 2025-03-27 15:34:51 +01:00
parent a5fb079c06
commit c65c53cf73
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
2 changed files with 56 additions and 11 deletions

View file

@ -28,6 +28,29 @@
];
};
};
portal = {
enable = true;
configPackages = with pkgs; [
# xdg-desktop-portal-wlr
# xdg-desktop-portal-gtk
# xdg-desktop-portal-hyprland
xdg-desktop-portal-gnome
# xdg-desktop-portal
# kdePackages.xdg-desktop-portal-kde
# libsForQt5.xdg-desktop-portal-kde
gnome-keyring
];
extraPortals = with pkgs; [
# xdg-desktop-portal-wlr
# xdg-desktop-portal-gtk
# xdg-desktop-portal-hyprland
xdg-desktop-portal-gnome
# xdg-desktop-portal
# kdePackages.xdg-desktop-portal-kde
gnome-keyring
];
};
};
home.packages = [ pkgs.xdg-utils ];
}

View file

@ -1,29 +1,51 @@
{ pkgs, ... }:
{
xdg = {
autostart.enable = true;
menus.enable = true;
mime.enable = true;
icons.enable = true;
portal = {
enable = true;
configPackages = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
# xdg-desktop-portal-wlr
# xdg-desktop-portal-gtk
# xdg-desktop-portal-hyprland
xdg-desktop-portal-gnome
xdg-desktop-portal
kdePackages.xdg-desktop-portal-kde
libsForQt5.xdg-desktop-portal-kde
# xdg-desktop-portal
# kdePackages.xdg-desktop-portal-kde
# libsForQt5.xdg-desktop-portal-kde
gnome-keyring
];
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
# xdg-desktop-portal-wlr
# xdg-desktop-portal-gtk
# xdg-desktop-portal-hyprland
xdg-desktop-portal-gnome
xdg-desktop-portal
kdePackages.xdg-desktop-portal-kde
# xdg-desktop-portal
# kdePackages.xdg-desktop-portal-kde
gnome-keyring
];
xdgOpenUsePortal = true;
wlr.enable = true;
};
};
security.rtkit.enable = true;
security.polkit.enable = true;
services.gnome.gnome-keyring.enable = true;
systemd.user.services.niri-flake-polkit = {
description = "PolicyKit Authentication Agent provided by niri-flake";
wantedBy = [ "niri.service" ];
after = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
}