sway: enable sway in nixos config too, not just home-manager

Fixes an issue with xdg portals.
This commit is contained in:
Casper V. Kristensen 2023-12-01 21:53:08 +01:00
parent 9056600dc8
commit 5f7dc29d25

View file

@ -1,6 +1,11 @@
{ home-manager, lib, pkgs, ... }: {
# https://nixos.wiki/wiki/Sway
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
# Polkit is required to configure sway with home-manager
security.polkit.enable = true;
@ -268,14 +273,16 @@
];
# xdg portal allows applications secure access to resources outside their
# sandbox. In particular, this allows screen sharing on Wayland via PipeWire
# and file open/save dialogues in Firefox.
# sandbox through a D-Bus interface. In particular, this allows screen
# sharing on Wayland via PipeWire and file open/save dialogues in Firefox.
# https://wiki.archlinux.org/title/XDG_Desktop_Portal
# https://mozilla.github.io/webrtc-landing/gum_test.html
services.dbus.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};