summaryrefslogtreecommitdiff
path: root/nonguix
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2024-01-31 21:40:23 +0800
committerJohn Kehayias <john.kehayias@protonmail.com>2024-03-22 21:08:39 -0400
commit09151acd73b955bc30ec67771b812a0102258adc (patch)
tree851e0b59e2e27426cd76871e9d59c204a85d54ba /nonguix
parent8c08d0bbe5f353dc1c78e398500cb49d96ea1828 (diff)
nonguix: multiarch-container: Share Wayland environment.
* nonguix/multiarch-container.scm (make-container-wrapper): Preserve environment variables and share socket for Wayland. Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
Diffstat (limited to 'nonguix')
-rw-r--r--nonguix/multiarch-container.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/nonguix/multiarch-container.scm b/nonguix/multiarch-container.scm
index 7b68ceb..a9f1559 100644
--- a/nonguix/multiarch-container.scm
+++ b/nonguix/multiarch-container.scm
@@ -260,8 +260,9 @@ in a sandboxed FHS environment."
(home (getenv "HOME"))
(sandbox-home (or (getenv "GUIX_SANDBOX_HOME")
(string-append home "/" #$(ngc-sandbox-home container))))
+ (wayland-display (or (getenv "WAYLAND_DISPLAY")
+ "wayland-0"))
(preserved-env '("^DBUS_"
- "^DISPLAY$"
"^DRI_PRIME$"
"^GDK_SCALE$" ; For UI scaling.
"^GUIX_LOCPATH$" ; For pressure-vessel locales.
@@ -293,8 +294,11 @@ in a sandboxed FHS environment."
"^XAUTHORITY$"
;; Matching all ^XDG_ vars causes issues
;; discussed in 80decf05.
+ "^XDG_CURRENT_DESKTOP$"
"^XDG_DATA_HOME$"
"^XDG_RUNTIME_DIR$"
+ "^XDG_SESSION_(CLASS|TYPE)$"
+ "^(WAYLAND_)?DISPLAY$"
#$@(ngc-preserved-env container) ; Environment from container.
;; The following are useful for debugging.
"^CAPSULE_DEBUG$"
@@ -333,6 +337,7 @@ in a sandboxed FHS environment."
,@(exists-> (string-append home "/.config/pulse"))
,@(exists-> (string-append xdg-runtime "/pulse"))
,@(exists-> (string-append xdg-runtime "/bus"))
+ ,@(exists-> (string-append xdg-runtime "/" wayland-display))
,@(exists-> (getenv "XAUTHORITY"))
#$@(ngc-shared container)))
(DEBUG (equal? (getenv "DEBUG") "1"))