aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/remote-dev
diff options
context:
space:
mode:
Diffstat (limited to 'remote-dev')
-rw-r--r--remote-dev/README.md7
-rwxr-xr-xremote-dev/bootstrap.sh15
-rw-r--r--remote-dev/home.nix10
3 files changed, 30 insertions, 2 deletions
diff --git a/remote-dev/README.md b/remote-dev/README.md
index 4622f31..bdb81ca 100644
--- a/remote-dev/README.md
+++ b/remote-dev/README.md
@@ -134,6 +134,13 @@ git log --show-signature -1
- **Network for first nvim launch**: `vim.pack.add` fetches plugins
from GitHub on first start. Mason will also fetch LSP servers using
`nodejs`/`uv` from this profile.
+- **Mason pip installs need `python3-venv`**: a handful of Mason
+ packages (autotools-language-server, codespell, mdformat,
+ nginx-language-server, systemdlint) install themselves into per-pkg
+ venvs via `python3 -m venv`. Ubuntu ships `python3` without the
+ `venv` module by default. `bootstrap.sh` installs `python3-venv`
+ via apt; on an existing VM run `sudo apt-get install python3-venv`
+ once, then `:MasonToolsInstall` (or `:MasonInstallAll`) in nvim.
- **Ubuntu apt collisions**: Nix-installed binaries appear first in
PATH. The leaf-tools policy above exists precisely to keep this
shadowing contained to harmless tools.
diff --git a/remote-dev/bootstrap.sh b/remote-dev/bootstrap.sh
index 48cea11..157c902 100755
--- a/remote-dev/bootstrap.sh
+++ b/remote-dev/bootstrap.sh
@@ -34,6 +34,21 @@ else
log "Nix already installed, skipping installer."
fi
+# ── 1b. Mason prerequisites from apt ──────────────────────────────────────────
+# Mason (in neovim) installs some LSPs/linters via pip into per-package venvs.
+# Ubuntu ships python3 without the venv module by default, so without
+# python3-venv every pip-based Mason package silently fails to install.
+# Affected: autotools-language-server, codespell, mdformat, nginx-language-server,
+# systemdlint. We deliberately don't pull python3 into the Nix profile (it
+# would shadow Ubuntu's and break system builds — see remote-dev/home.nix).
+if command -v sudo >/dev/null 2>&1 && command -v apt-get >/dev/null 2>&1; then
+ if ! dpkg -s python3-venv >/dev/null 2>&1; then
+ log "Installing python3-venv via apt (required for Mason pip installs)…"
+ sudo apt-get update -qq
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq python3-venv
+ fi
+fi
+
# Source nix env for the rest of this script (installer writes
# /etc/profile.d/nix.sh but the current shell hasn't sourced it).
if [ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then
diff --git a/remote-dev/home.nix b/remote-dev/home.nix
index 98376a4..d178eca 100644
--- a/remote-dev/home.nix
+++ b/remote-dev/home.nix
@@ -82,8 +82,14 @@ in
clang-tools
# Editor/AI agent runtimes — NOT for project builds (see policy above)
- nodejs # Mason npm LSPs; system python3 stays at /usr/bin/python3
- uv # Mason python LSPs in isolated venvs; brings `uv`/`uvx` only
+ nodejs_24 # Mason npm LSPs + copilot-language-server (needs Node 24, see ai.lua)
+ uv # Mason python LSPs in isolated venvs; brings `uv`/`uvx` only
+ jre # for Mason's groovy-language-server (headless Java runtime)
+
+ # Mason fallbacks: Mason's pip/cargo installers can't run on this VM
+ # under our leaf-tools policy, so we provide these binaries on PATH and
+ # let nvim/Mason find them there instead of trying to build them.
+ shellharden
# AI coding agents
claude-code