From 569300948829fb107bc26be287caf1951b70958c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sun, 3 May 2026 16:29:24 +0200 Subject: [PATCH] fix(opencode): set LD_LIBRARY_PATH for prebuilt node bindings The file watcher binding (and other node-precompiled .node modules loaded via dlopen) failed with "libstdc++.so.6: cannot open shared object file" because systemd services don't inherit the user shell's LD path. Reuse the nix-ld library list so the service sees the same common libraries unwrapped binaries get globally. --- systems/x86_64-linux/amd/opencode.nix | 1 + systems/x86_64-linux/sgx/opencode.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/systems/x86_64-linux/amd/opencode.nix b/systems/x86_64-linux/amd/opencode.nix index 4c7b91b..df23c73 100644 --- a/systems/x86_64-linux/amd/opencode.nix +++ b/systems/x86_64-linux/amd/opencode.nix @@ -35,6 +35,7 @@ in environment = { HOME = homeDir; + LD_LIBRARY_PATH = lib.makeLibraryPath config.programs.nix-ld.libraries; }; serviceConfig = { diff --git a/systems/x86_64-linux/sgx/opencode.nix b/systems/x86_64-linux/sgx/opencode.nix index 286df36..1ec6438 100644 --- a/systems/x86_64-linux/sgx/opencode.nix +++ b/systems/x86_64-linux/sgx/opencode.nix @@ -35,6 +35,7 @@ in environment = { HOME = homeDir; + LD_LIBRARY_PATH = lib.makeLibraryPath config.programs.nix-ld.libraries; }; serviceConfig = {