You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User-level systemd units (systemctl --user) die on logout unless the user has lingering enabled. Today that matters for dev-daemon.service (from thompsonson/dev); tomorrow it will matter for microvm@*.service (see Group B / thompsonson/dev#11) and potentially other user-scope daemons.
Single line to fix: sudo loginctl enable-linger "$USER". Needs to live somewhere explicit because it requires sudo and can't be done from chezmoi apply.
Proposed shape
Consolidate Linux sudo-required bootstrap into a single script, rather than scattering one-liners across per-feature setup scripts. Group B (#27) already proposes dot_local/share/dev-sandbox/setup-host.sh. Promote that to a more general dot_local/share/dotfiles-bootstrap/setup-host-linux.sh and have it handle:
(Future) nftables skeleton if/when the dev egress-proxy story wants host-level rules.
Script is idempotent, prints what it did vs what was already set, never destructive. Matches the pattern from thompsonson/devscripts/install.sh --systemd — explicit, sudo-scoped, user-triggered.
Changes
New dot_local/share/dotfiles-bootstrap/setup-host-linux.sh
Shebang + set -euo pipefail. Header comment explains it requires sudo and is one-shot on a new machine. Each step:
Cross-link the setup script in the "new machine" onboarding path:
### New Linux machine1. Install chezmoi and init this repo.
2.`chezmoi apply`.
3.`sudo ~/.local/share/dotfiles-bootstrap/setup-host-linux.sh` — enables user lingering, loads kernel modules, verifies kvm perms. One-shot.
macOS
No equivalent script needed today. Leave a stub setup-host-macos.sh that says "nothing required" to keep the onboarding docs symmetric, or omit entirely.
Verification checklist
Fresh Pop!_OS VM: after chezmoi apply, running the script enables lingering; second run is a no-op.
loginctl show-user $USER | grep Linger=yes after first run.
Script fails loudly if run without sudo (not silently partially).
macOS apply is unaffected (script is Linux-only; opt-in path).
Scope notes
This issue replaces the setup-host.sh scope in Group B (Group B: microVM sandbox host prep (Linux only, depends on A) #27) — rather than having two overlapping scripts (dev-sandbox/setup-host.sh + this), Group B should reference this one and add its microVM-specific steps into it.
thompsonson/dev — contrib/systemd/dev-daemon.service is the original motivator; users installing with scripts/install.sh --systemd today hit this silently when they logout.
User-level systemd units (
systemctl --user) die on logout unless the user has lingering enabled. Today that matters fordev-daemon.service(fromthompsonson/dev); tomorrow it will matter formicrovm@*.service(see Group B / thompsonson/dev#11) and potentially other user-scope daemons.Single line to fix:
sudo loginctl enable-linger "$USER". Needs to live somewhere explicit because it requires sudo and can't be done from chezmoi apply.Proposed shape
Consolidate Linux sudo-required bootstrap into a single script, rather than scattering one-liners across per-feature setup scripts. Group B (#27) already proposes
dot_local/share/dev-sandbox/setup-host.sh. Promote that to a more generaldot_local/share/dotfiles-bootstrap/setup-host-linux.shand have it handle:loginctl enable-linger "$USER"(this issue).vhost_vsockmodule load +/etc/modules-load.d/vhost-vsock.conf(from Group B: microVM sandbox host prep (Linux only, depends on A) #27 — fold in here)./dev/kvmperms + kvm group membership (from Group B: microVM sandbox host prep (Linux only, depends on A) #27 — fold in here).devegress-proxy story wants host-level rules.Script is idempotent, prints what it did vs what was already set, never destructive. Matches the pattern from
thompsonson/devscripts/install.sh --systemd— explicit, sudo-scoped, user-triggered.Changes
New
dot_local/share/dotfiles-bootstrap/setup-host-linux.shShebang +
set -euo pipefail. Header comment explains it requires sudo and is one-shot on a new machine. Each step:Same shape for vsock module,
/dev/kvmgroup check, etc. Final report at end: "Ready / Missing" summary.docs/sandbox.md(from #27) +README.mdCross-link the setup script in the "new machine" onboarding path:
macOS
No equivalent script needed today. Leave a stub
setup-host-macos.shthat says "nothing required" to keep the onboarding docs symmetric, or omit entirely.Verification checklist
chezmoi apply, running the script enables lingering; second run is a no-op.loginctl show-user $USER | grep Linger=yesafter first run.systemctl --user start dev-daemon.service+ logout + re-login: daemon still running.Scope notes
dev-sandbox/setup-host.sh+ this), Group B should reference this one and add its microVM-specific steps into it.Related
setup-host.sh. Resolve by making this the canonical script and Group B: microVM sandbox host prep (Linux only, depends on A) #27 adding microVM steps to it.contrib/systemd/dev-daemon.serviceis the original motivator; users installing withscripts/install.sh --systemdtoday hit this silently when they logout.