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. --- justfile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'justfile') 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 -- cgit v1.3.1