Revert: Restore Boot=yes and machinectl start workspace

- Restore Boot=yes in workspace.nspawn
- Restore machinectl start workspace in .zshrc
- Boot method is necessary for proper systemd environment
This commit is contained in:
Claude
2025-11-07 19:06:30 +00:00
parent 66f3fe4045
commit d3ea2cc78d

View File

@@ -35,6 +35,7 @@ echo "Creating workspace container configuration..."
mkdir -p $ROOTFS/etc/systemd/nspawn mkdir -p $ROOTFS/etc/systemd/nspawn
cat > $ROOTFS/etc/systemd/nspawn/workspace.nspawn <<'EOF' cat > $ROOTFS/etc/systemd/nspawn/workspace.nspawn <<'EOF'
[Exec] [Exec]
Boot=yes
ResolvConf=copy-host ResolvConf=copy-host
[Files] [Files]
@@ -75,7 +76,9 @@ if [[ -o login ]] && [[ -o interactive ]]; then
if [[ -z "$INSIDE_WORKSPACE" ]]; then if [[ -z "$INSIDE_WORKSPACE" ]]; then
# Running as ai user on aios OS - enter workspace container # Running as ai user on aios OS - enter workspace container
export INSIDE_WORKSPACE=1 export INSIDE_WORKSPACE=1
exec sudo systemd-nspawn -q -D /var/lib/machines/workspace /bin/zsh sudo machinectl start workspace 2>/dev/null || true
sleep 1
exec sudo machinectl shell workspace
else else
# Running as root inside workspace container - start claude # Running as root inside workspace container - start claude
if command -v claude &>/dev/null; then if command -v claude &>/dev/null; then