feat: Add machinectl management and backup/restore system
- Create cfg/aios-ctl.zsh with machinectl control commands - aios-start/stop/shell/login for basic operations - aios-backup to save current state to aiosback - aios-reset to restore from backup (preserves config files) - aios-update to update packages in backup - Create cfg/install.sh for automated installation - Extracts tarball to /var/lib/machines/aios - Creates systemd-nspawn configuration - Automatically creates initial backup image (aiosback) - Include aios-ctl.zsh in container at /opt/aios-ctl.zsh - Include install.sh in tarball for easy deployment - Config files in ~/.config/syui/ai are bind-mounted and preserved across resets
This commit is contained in:
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -93,7 +93,10 @@ jobs:
|
||||
sleep 2
|
||||
arch-chroot root.x86_64/var/lib/machines/arch /bin/sh -c 'pkill aigpt'
|
||||
arch-chroot root.x86_64/var/lib/machines/arch /bin/sh -c 'if command -v sqlite3 &>/dev/null; then sqlite3 /root/.config/syui/ai/gpt/memory.db "PRAGMA journal_mode=WAL; PRAGMA synchronous=NORMAL;"; fi'
|
||||
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
||||
cp -rf ./cfg/aios-ctl.zsh root.x86_64/var/lib/machines/arch/opt/aios-ctl.zsh
|
||||
cp -rf ./cfg/install.sh ./install.sh
|
||||
chmod +x ./install.sh
|
||||
tar -zcvf aios-bootstrap.tar.gz root.x86_64/ install.sh
|
||||
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
|
||||
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
|
||||
docker push ${{ env.IMAGE_NAME }}
|
||||
|
||||
Reference in New Issue
Block a user