add desktop portals fix for niri

This commit is contained in:
Nate Anderson 2026-02-26 11:10:17 -07:00
parent a0e6e63486
commit acbdd1b366
11 changed files with 31 additions and 93 deletions

12
flake.lock generated
View File

@ -200,11 +200,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1771208521,
"narHash": "sha256-X01Q3DgSpjeBpapoGA4rzKOn25qdKxbPnxHeMLNoHTU=",
"lastModified": 1771903837,
"narHash": "sha256-sdaqdnsQCv3iifzxwB22tUwN/fSHoN7j2myFW5EIkGk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fa56d7d6de78f5a7f997b0ea2bc6efd5868ad9e8",
"rev": "e764fc9a405871f1f6ca3d1394fb422e0a0c3951",
"type": "github"
},
"original": {
@ -216,11 +216,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1771008912,
"narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
"lastModified": 1771848320,
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a82ccc39b39b621151d6732718e3e250109076fa",
"rev": "2fc6539b481e1d2569f25f8799236694180c0993",
"type": "github"
},
"original": {

View File

@ -239,7 +239,7 @@ window-rule {
// Block out notifications from screencasts.
layer-rule {
match namespace="^notifications$"
match namespace="^noctalia-notifications"
block-out-from "screencast"
}

View File

@ -37,23 +37,7 @@ in
nixpkgs.config.allowUnfree = config.niriwm.useNonFree;
###
## XDG portal setup
###
xdg.portal = {
config = {
common = {
default = [
"wlr"
];
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
];
wlr.enable = true;
enable = true;
};
# Portal setup is handled by programs.niri.enable (niri-portals.conf)
xdg.sounds.enable = true;
###
@ -93,7 +77,7 @@ in
# use wayland
MOZ_ENABLE_WAYLAND = "1";
T_QPA_PLATFORM = "wayland";
GDK_BACKEND = "wayland";
# GDK_BACKEND must NOT be set globally - it breaks the screencast portal
WLR_NO_HARDWARE_CURSORS = "1";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";

View File

@ -47,9 +47,7 @@
pavucontrol
syncthingtray
tailscale-systray
# include portals here for flatpak
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
# Portals are managed at system level by programs.niri.enable
]
config.nirihome.homePackages
];

View File

@ -40,23 +40,7 @@ in
nixpkgs.config.allowUnfree = config.niriwm.useNonFree;
###
## XDG portal setup
###
xdg.portal = {
config = {
common = {
default = [
"wlr"
];
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
];
wlr.enable = true;
enable = true;
};
# Portal setup is handled by programs.niri.enable (niri-portals.conf)
xdg.sounds.enable = true;
###
@ -92,7 +76,7 @@ in
# use wayland
MOZ_ENABLE_WAYLAND = "1";
T_QPA_PLATFORM = "wayland";
GDK_BACKEND = "wayland";
# GDK_BACKEND must NOT be set globally - it breaks the screencast portal
WLR_NO_HARDWARE_CURSORS = "1";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";

View File

@ -47,9 +47,7 @@
pavucontrol
syncthingtray
tailscale-systray
# include portals here for flatpak
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
# Portals are managed at system level by programs.niri.enable
]
config.nirihome.homePackages
];

View File

@ -28,7 +28,7 @@ debug {
//
output "HDMI-A-1" {
scale 1.0
variable-refresh-rate on-demand=true
// variable-refresh-rate on-demand=true
transform "normal"
}
@ -258,11 +258,21 @@ window-rule {
// Block out notifications from screencasts.
layer-rule {
match namespace="^notifications$"
match namespace="noctalia-notifications"
match namespace="notifications"
match namespace="noctalia-bar-exclusion"
block-out-from "screencast"
}
layer-rule {
match namespace="noctalia-notifications"
match namespace="notifications"
match namespace="noctalia-bar-exclusion"
block-out-from "screen-capture"
}
// Noctalia overview wallpaper on backdrop (blurred in overview mode)
layer-rule {
match namespace="^noctalia-overview*"

View File

@ -28,23 +28,7 @@
nixpkgs.config.allowUnfree = config.niriwm.useNonFree;
###
## XDG portal setup
###
xdg.portal = {
config = {
common = {
default = [
"wlr"
];
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
];
wlr.enable = true;
enable = true;
};
# Portal setup is handled by programs.niri.enable (niri-portals.conf)
xdg.sounds.enable = true;
###
@ -88,7 +72,7 @@
MOZ_ENABLE_WAYLAND = "1";
FIREFOX_USE_SYSTEM_THEME = "true";
T_QPA_PLATFORM = "wayland";
GDK_BACKEND = "wayland";
# GDK_BACKEND must NOT be set globally - it breaks the screencast portal
WLR_NO_HARDWARE_CURSORS = "1";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";

View File

@ -47,9 +47,7 @@
pavucontrol
syncthingtray
tailscale-systray
# include portals here for flatpak
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
# Portals are managed at system level by programs.niri.enable
]
config.nirihome.homePackages
];

View File

@ -41,23 +41,7 @@ in
nixpkgs.config.allowUnfree = config.niriwm.useNonFree;
###
## XDG portal setup
###
xdg.portal = {
config = {
common = {
default = [
"wlr"
];
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
];
wlr.enable = true;
enable = true;
};
# Portal setup is handled by programs.niri.enable (niri-portals.conf)
xdg.sounds.enable = true;
###
@ -99,7 +83,7 @@ in
MOZ_ENABLE_WAYLAND = "1";
FIREFOX_USE_SYSTEM_THEME = "true";
T_QPA_PLATFORM = "wayland";
GDK_BACKEND = "wayland";
# GDK_BACKEND must NOT be set globally - it breaks the screencast portal
WLR_NO_HARDWARE_CURSORS = "1";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";

View File

@ -47,9 +47,7 @@
pavucontrol
syncthingtray
tailscale-systray
# include portals here for flatpak
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
# Portals are managed at system level by programs.niri.enable
]
config.nirihome.homePackages
];