fix: Remove claude.service and fix network settings
- Remove cfg/claude.service (claude should be run manually, not as systemd service) - Fix bind mount: change %h to /root for proper path resolution - Fix network: change to VirtualEthernet=no for internet access - Update install.sh to create proper nspawn configs for all containers - Create /root/.config/syui/ai directory in install.sh Working flow: - aios OS boot -> ai user login - machinectl login workspace - manually run 'claude' command
This commit is contained in:
@@ -36,6 +36,8 @@ mv root.x86_64/var/lib/machines/arch /var/lib/machines/$NAME
|
||||
# Copy nspawn configuration
|
||||
echo "3. Installing systemd-nspawn configuration..."
|
||||
mkdir -p /etc/systemd/nspawn
|
||||
|
||||
# Create aios.nspawn
|
||||
cat > /etc/systemd/nspawn/$NAME.nspawn <<'EOF'
|
||||
[Exec]
|
||||
Boot=yes
|
||||
@@ -43,13 +45,43 @@ PrivateUsers=pick
|
||||
ResolvConf=copy-host
|
||||
|
||||
[Files]
|
||||
Bind=%h/.config/syui/ai:/root/.config/syui/ai
|
||||
Bind=/root/.config/syui/ai:/root/.config/syui/ai
|
||||
|
||||
[Network]
|
||||
Private=yes
|
||||
VirtualEthernet=yes
|
||||
VirtualEthernet=no
|
||||
EOF
|
||||
|
||||
# Create aiosback.nspawn
|
||||
cat > /etc/systemd/nspawn/$BACKUP.nspawn <<'EOF'
|
||||
[Exec]
|
||||
Boot=yes
|
||||
PrivateUsers=pick
|
||||
ResolvConf=copy-host
|
||||
|
||||
[Files]
|
||||
Bind=/root/.config/syui/ai:/root/.config/syui/ai
|
||||
|
||||
[Network]
|
||||
VirtualEthernet=no
|
||||
EOF
|
||||
|
||||
# Create workspace.nspawn
|
||||
cat > /etc/systemd/nspawn/workspace.nspawn <<'EOF'
|
||||
[Exec]
|
||||
Boot=yes
|
||||
PrivateUsers=pick
|
||||
ResolvConf=copy-host
|
||||
|
||||
[Files]
|
||||
Bind=/root/.config/syui/ai:/root/.config/syui/ai
|
||||
|
||||
[Network]
|
||||
VirtualEthernet=no
|
||||
EOF
|
||||
|
||||
# Create bind mount directory
|
||||
mkdir -p /root/.config/syui/ai
|
||||
|
||||
# Enable systemd-machined
|
||||
echo "4. Enabling systemd-machined..."
|
||||
systemctl enable --now systemd-machined
|
||||
|
||||
Reference in New Issue
Block a user