From a694944286ec27debd9c7776b5b9635f3916bfbe Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Sat, 19 Oct 2024 01:50:37 -0500 Subject: [PATCH] fix break on non wayland --- flake.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 6871f80..93c5ea8 100644 --- a/flake.nix +++ b/flake.nix @@ -272,7 +272,14 @@ "--run" ''[ ! -d "$XDG_RUNTIME_DIR" ] && mkdir -p "$XDG_RUNTIME_DIR"'' "--run" - ''[ ! -S "$XDG_RUNTIME_DIR/wayland-0" ] && ln -s /run/user/$(id -u)/wayland-0 "$XDG_RUNTIME_DIR/wayland-0"'' + '' + if [ -n "$WAYLAND_DISPLAY" ]; then + if [ ! -S "$XDG_RUNTIME_DIR/wayland-0" ]; then + mkdir -p "$XDG_RUNTIME_DIR" + ln -sf /run/user/$(id -u)/wayland-0 "$XDG_RUNTIME_DIR/wayland-0" + fi + fi + '' ]; }); };