packages/nixpak: fix gui-base module

This commit is contained in:
Max Headroom 2023-01-07 19:04:59 +01:00
parent 9399c181b8
commit 4d7627ba83

View file

@ -1,5 +1,9 @@
{ config, lib, pkgs, sloth, ... }: { config, lib, pkgs, sloth, ... }:
let
envSuffix = envKey: suffix: sloth.concat' (sloth.env envKey) suffix;
in
{ {
config = { config = {
dbus.policies = { dbus.policies = {
@ -18,19 +22,21 @@
bubblewrap = { bubblewrap = {
network = lib.mkDefault false; network = lib.mkDefault false;
bind.rw = [ bind.rw = [
(sloth.concat' sloth.xdgCacheHome "fontconfig") (sloth.concat' sloth.xdgCacheHome "/fontconfig")
(sloth.concat' sloth.xdgCacheHome "mesa_shader_cache") (sloth.concat' sloth.xdgCacheHome "/mesa_shader_cache")
(sloth.concat [ (sloth.concat [
(sloth.env "XDG_RUNTIME_DIR") (sloth.env "XDG_RUNTIME_DIR")
"/" "/"
(sloth.env "WAYLAND_DISPLAY") (sloth.env "WAYLAND_DISPLAY")
]) ])
(sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/at-spi/bus")
(sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/gvfsd") (envSuffix "XDG_RUNTIME_DIR" "/at-spi/bus")
(sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/pulse") (envSuffix "XDG_RUNTIME_DIR" "/gvfsd")
(envSuffix "XDG_RUNTIME_DIR" "/pulse")
]; ];
bind.ro = [ 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-2.0")
(sloth.concat' sloth.xdgConfigHome "/gtk-3.0") (sloth.concat' sloth.xdgConfigHome "/gtk-3.0")
(sloth.concat' sloth.xdgConfigHome "/gtk-4.0") (sloth.concat' sloth.xdgConfigHome "/gtk-4.0")