From 4d7627ba83c1ec7d65e95a92bb11b72082192f1a Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 7 Jan 2023 19:04:59 +0100 Subject: [PATCH] packages/nixpak: fix gui-base module --- packages/nixpak/modules/gui-base.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/nixpak/modules/gui-base.nix b/packages/nixpak/modules/gui-base.nix index 480c099..b97fdb7 100644 --- a/packages/nixpak/modules/gui-base.nix +++ b/packages/nixpak/modules/gui-base.nix @@ -1,5 +1,9 @@ { config, lib, pkgs, sloth, ... }: +let + envSuffix = envKey: suffix: sloth.concat' (sloth.env envKey) suffix; +in + { config = { dbus.policies = { @@ -18,19 +22,21 @@ bubblewrap = { network = lib.mkDefault false; bind.rw = [ - (sloth.concat' sloth.xdgCacheHome "fontconfig") - (sloth.concat' sloth.xdgCacheHome "mesa_shader_cache") + (sloth.concat' sloth.xdgCacheHome "/fontconfig") + (sloth.concat' sloth.xdgCacheHome "/mesa_shader_cache") + (sloth.concat [ (sloth.env "XDG_RUNTIME_DIR") "/" (sloth.env "WAYLAND_DISPLAY") ]) - (sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/at-spi/bus") - (sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/gvfsd") - (sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/pulse") + + (envSuffix "XDG_RUNTIME_DIR" "/at-spi/bus") + (envSuffix "XDG_RUNTIME_DIR" "/gvfsd") + (envSuffix "XDG_RUNTIME_DIR" "/pulse") ]; bind.ro = [ - (sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/doc") + (envSuffix "XDG_RUNTIME_DIR" "/doc") (sloth.concat' sloth.xdgConfigHome "/gtk-2.0") (sloth.concat' sloth.xdgConfigHome "/gtk-3.0") (sloth.concat' sloth.xdgConfigHome "/gtk-4.0")