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")