From 4733bb185e8c9d02c0eda4f881f5a5822444daae Mon Sep 17 00:00:00 2001 From: Hari <73809867+harivansh-afk@users.noreply.github.com> Date: Fri, 3 Apr 2026 13:35:34 -0400 Subject: [PATCH] edit config (#62) * edit config * Update home/openclaw.nix Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- home/openclaw.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/home/openclaw.nix b/home/openclaw.nix index 300395d..d3ea4f7 100644 --- a/home/openclaw.nix +++ b/home/openclaw.nix @@ -8,7 +8,7 @@ let openClawStateDir = "${config.home.homeDirectory}/.openclaw"; openClawWorkspaceDir = "${openClawStateDir}/workspace"; - npmDir = "${config.xdg.dataHome}/npm"; + openClawVersion = "2026.4.2"; in lib.mkIf hostConfig.isLinux { home.activation.installOpenClaw = lib.hm.dag.entryAfter [ "writeBoundary" ] '' @@ -22,8 +22,9 @@ lib.mkIf hostConfig.isLinux { export XDG_DATA_HOME="${config.xdg.dataHome}" export XDG_CACHE_HOME="${config.xdg.cacheHome}" - if [ ! -d "${npmDir}/lib/node_modules/openclaw" ]; then - npm install -g openclaw@latest 2>/dev/null || true + INSTALLED=$(npm ls -g openclaw --depth=0 --json 2>/dev/null | ${pkgs.jq}/bin/jq -r '.dependencies.openclaw.version // empty') + if [ "$INSTALLED" != "${openClawVersion}" ]; then + npm install -g "openclaw@${openClawVersion}" 2>/dev/null || true fi '';