Commit Graph

11 Commits

Author SHA1 Message Date
Claude
4352a7d0e3 fix: Correct OS structure - root.x86_64 is OS root, not machines/aios
Fixed the fundamental issue:
- root.x86_64/ = aios OS (entire filesystem)
- root.x86_64/var/lib/machines/ = child containers directory

Changes:
- build.zsh: Use root.x86_64 directly as OS root
- setup-user.sh: ROOTFS=root.x86_64
- setup-claude.sh: ROOTFS=root.x86_64
- user-continer.sh: ROOTFS=root.x86_64
- install.sh: mv root.x86_64 /var/lib/machines/aios

Now matches github-actions structure correctly.
2025-11-07 16:55:36 +00:00
Claude
e2b0d7a51d refactor: Simplify install.sh and rename arch to aios throughout
- Simplified install.sh to just extract and mv
- Renamed root.x86_64/var/lib/machines/arch to aios
- Updated all references in build.zsh, setup-user.sh, setup-claude.sh
2025-11-07 15:00:01 +00:00
Claude
abdb399552 fix: Remove unused BACKUP variable from install.sh 2025-11-07 14:44:43 +00:00
Claude
49da9ec86a fix: Don't pre-create child containers - let ai user create them as needed
Changed to only prepare /var/lib/machines/ directory inside aios.
ai user will create child containers (workspace, restore-img, etc.) using machinectl as needed.
2025-11-07 14:41:36 +00:00
Claude
e88b241519 fix: Restructure containers - aios contains child containers internally
Changed from 3 separate containers to 1 container with child containers inside:
- /var/lib/machines/aios/ (main container)
  - /var/lib/machines/restore-img/ (child container)
  - /var/lib/machines/workspace/ (child container)

ai user operates child containers from within aios using machinectl.
2025-11-07 14:40:46 +00:00
Claude
511cf960d6 feat: Pre-create containers in build.zsh
Changed container creation from install-time to build-time:

Before:
- build.zsh: create only aios
- install.sh: machinectl clone aios → aiosback, workspace

After:
- build.zsh: create aios + aiosback + workspace (cp -a)
- install.sh: just extract and move to /var/lib/machines/

Benefits:
- Simpler install.sh (no machinectl clone operations)
- Faster installation (no clone overhead)
- All containers included in tarball
- Consistent initial state
2025-11-07 12:53:12 +00:00
Claude
4caa0bbbc6 fix: Improve force removal of existing images in install.sh
- Increase sleep time to 2 seconds
- Add SIGKILL as last resort
- Continue with warning if removal fails
2025-11-07 11:47:12 +00:00
Claude
5f4384d812 feat: Remove existing images before cloning in install.sh
- Check if aiosback and workspace already exist
- Stop, terminate, and remove existing images before clone
- Prevents 'File exists' error on re-installation
2025-11-07 11:29:55 +00:00
Claude
7d531c2608 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
2025-11-07 07:02:43 +00:00
Claude
ff161f84a0 feat: Add workspace container with claude auto-start
- Create cfg/claude.service for systemd auto-start of Claude Code
- Enable claude.service on container boot
- Update install.sh to automatically create workspace container
- Update aios.zsh to start workspace and connect when shell:true
- Add machinectl to sudoers NOPASSWD for ai user
- Workspace container starts on login, claude.service auto-runs inside
2025-11-07 06:02:40 +00:00
Claude
a3e1878c14 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
2025-11-06 15:56:00 +00:00