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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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