From 40d8fd056bef4526acbe38a9b6ff98fc0c3fd8c9 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 20 May 2026 13:56:10 +0100 Subject: fix(nix,nvim): drop gh-actions-language-server (not in nixpkgs); export USER in nix-switch - gh-actions-language-server is an npm package (lttb/gh-actions-language-server) not packaged in nixpkgs. Removed from nix/common.nix and from the vim.lsp.enable list in dot_config/nvim/lua/plugins/lsp.lua. Restore later via a per-project flake.nix if working on a workflows-heavy repo. - just runs recipes with a sanitized env where $USER may be unset; home-manager's activation script dereferences it unconditionally and fails with 'USER: unbound variable'. Export USER (and HOME for symmetry) at the top of the nix-switch recipe. --- dot_config/nvim/lua/plugins/lsp.lua | 1 - justfile | 4 ++++ nix/common.nix | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dot_config/nvim/lua/plugins/lsp.lua b/dot_config/nvim/lua/plugins/lsp.lua index 5039d04..98f0f66 100644 --- a/dot_config/nvim/lua/plugins/lsp.lua +++ b/dot_config/nvim/lua/plugins/lsp.lua @@ -21,7 +21,6 @@ vim.lsp.enable({ "cssls", "dockerls", "eslint", - "gh_actions_ls", "html", "jsonls", "lua_ls", diff --git a/justfile b/justfile index fa80823..8af74bb 100644 --- a/justfile +++ b/justfile @@ -30,6 +30,10 @@ nix-switch: echo "nix not installed; skipping home-manager switch" >&2 exit 0 fi + # home-manager's activation script references $USER unconditionally; + # just runs recipes with a sanitized env that may drop it. + export USER="${USER:-$(id -un)}" + export HOME="${HOME:-$(getent passwd "$USER" | cut -d: -f6)}" profile=host [ -f /etc/os-release ] && . /etc/os-release || true case "${ID:-}" in diff --git a/nix/common.nix b/nix/common.nix index 46fa369..55e2d21 100644 --- a/nix/common.nix +++ b/nix/common.nix @@ -145,7 +145,6 @@ in basedpyright bash-language-server dockerfile-language-server-nodejs - gh-actions-language-server just-lsp lua-language-server neocmakelsp -- cgit v1.3.1