sway: refactor: store sway-portals.conf in the user dir instead of system-wide

it's a user service, so prefer to configure it via user/home conf dirs
This commit is contained in:
Colin 2024-02-12 07:13:39 +00:00
parent 6b3a71aadf
commit c0883dc777

View File

@ -332,10 +332,6 @@ in
# instead, i manage portals myself via the sane.programs API (e.g. sane.programs.xdg-desktop-portal).
xdg.portal.enable = false;
xdg.menus.enable = false; #< links /share/applications, and a bunch of other empty (i.e. unused) dirs
environment.etc."xdg/xdg-desktop-portal/sway-portals.conf".text = ''
[preferred]
default=wlr;gtk
'';
sane.user.services.sway-session = {
description = "no-op unit to signal that sway is operational";
@ -352,6 +348,11 @@ in
};
sane.user.fs = {
".config/xdg-desktop-portal/sway-portals.conf".symlink.text = ''
# portals.conf docs: <https://flatpak.github.io/xdg-desktop-portal/docs/portals.conf.html>
[preferred]
default=wlr;gtk
'';
".config/waybar/config".symlink.target =
(pkgs.formats.json {}).generate "waybar-config.json" [
({ layer = "top"; } // cfg.waybar.top)