Changed from building new containers to simply copying the aios base:
- Backup current aios to /tmp
- Copy backup as workspace
- Copy backup as restore-img
- Much faster and simpler than pacstrap
- Child containers have same config as parent aios
- Renamed init-containers.sh to user-continer.sh
- Moved container creation from ai user first login to build.zsh
- Removed initialization check from ai user .zshrc
- Child containers (workspace, restore-img) now pre-created by root
- ai user simply uses pre-existing containers
- 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
- Created init-containers.sh to create workspace and restore-img
- Runs automatically on ai user's first login
- Uses ~/.aios-initialized flag to run once
- Updated sudoers to allow pacstrap, arch-chroot commands
- Added pts/0-9 to /etc/securetty for systemd-nspawn login
- Enabled systemd-machined for ai user to use machinectl
- Added arch-install-scripts package for pacstrap support inside aios
Changed to only prepare /var/lib/machines/ directory inside aios.
ai user will create child containers (workspace, restore-img, etc.) using machinectl as needed.
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.
Add automatic MCP registration in .zshrc that runs after .claude.json is created.
On second login, aigpt server will be automatically registered to Claude Code.
Moved essential aios components to build.zsh (base layer):
- sudoers configuration (wheel group permissions)
- aigpt install (aios core package)
- aibot install (aios core package) - renamed from 'ai' to 'aibot'
Updated module responsibilities:
- build.zsh: Arch base + aios core packages (required)
- setup-user.sh: User customization only
- setup-claude.sh: Claude MCP configuration only
Benefits:
- Clear separation: base vs customization
- aigpt/aibot always included (core aios functionality)
- Modules can be optionally skipped for customization
Separated build.zsh into 3 clear parts:
1. build.zsh (Arch Linux base construction)
- archiso bootstrap
- pacstrap base system
- install base packages
- install Claude Code
2. cfg/setup-user.sh (User setup)
- Create ai user
- Configure sudoers
- Setup auto-login
- Configure zshrc and auto-start
3. cfg/setup-claude.sh (Claude/aigpt setup)
- Install aigpt
- Configure MCP
- Setup symlinks
- Initialize database
Benefits:
- Each file has a single, clear responsibility
- Easier to maintain and modify
- Can skip/customize setup steps if needed
- GitHub Actions simplified to just run build.zsh
- Add claude auto-start to ai user's .zshrc
- Only triggers in interactive login shell
- Uses exec to replace shell process with claude
- Enables seamless AI-first experience
Usage: machinectl shell workspace /bin/su - ai
→ Auto-login + Auto-start claude
- Check if aiosback and workspace already exist
- Stop, terminate, and remove existing images before clone
- Prevents 'File exists' error on re-installation
- 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
- 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
- Move MCP config to ~/.config/syui/ai/claude/ (bind-mounted)
- Create symlink ~/.config/claude -> ~/.config/syui/ai/claude
- Apply to both root and ai user
- Settings now shared across containers via bind mount
- No need to copy config files, they are automatically shared
- 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
Changed sudo configuration to allow NOPASSWD for specific commands only:
- pacman -Syu --noconfirm (system update)
- rm -rf /var/lib/pacman/db.lck (unlock pacman)
- poweroff (shutdown)
- reboot (reboot)
This is more secure than allowing all commands without password.
Added user setup:
- Username: ai
- Password: root
- Shell: zsh
- Groups: wheel (sudo enabled)
Auto-login configuration:
- getty@tty1 with --autologin ai
- .zshrc copied for both root and ai user
This provides a ready-to-use environment with AI-first user.
claude mcp add command does not support args parameter.
Changed to directly create claude_desktop_config.json with full config:
- command: aigpt
- args: ["server", "--enable-layer4"]
This ensures aigpt is properly registered with Layer 4 enabled.
Added automatic MCP registration:
- claude mcp add aigpt $(which aigpt) server
This eliminates manual MCP setup after installation.
Users can immediately use 'claude' with aigpt memory system.
cfg/os-release was not being copied, causing NAME to remain 'Arch Linux'
instead of 'aios'.
Added os-release copy to both:
- build.zsh
- .github/workflows/release.yml
archiso now creates bootstrap with systemd-nspawn standard structure:
root.x86_64/var/lib/machines/arch/ instead of root.x86_64/
Changes:
- build.zsh: Updated all arch-chroot paths to root.x86_64/var/lib/machines/arch
- build.zsh: Updated file copy paths for .zshrc, mcp.json, config.toml
- .github/workflows/release.yml: Same path updates
- Added aigpt + Claude Code installation steps to GitHub Actions
This aligns with systemd-nspawn's standard container directory structure
(/var/lib/machines/).
- Added ID_LIKE=arch (indicates Arch Linux base)
- Added VERSION_ID and VERSION (version information)
- Added VERSION_CODENAME=rolling
- Reorganized fields in standard order
- Updated IMAGE_VERSION to 2024.11.06
Simplified aios to focus on core value:
- Pre-configured systemd-nspawn environment
- Claude Code + aigpt (MCP) pre-installed
- Shared memory across containers
Philosophy:
Don't build new tools. Use existing ones (Claude Code, systemd-nspawn).
Just provide the optimal environment and automation.
Changes:
- Added cfg/zshrc: Shell config with claude alias
- Updated build.zsh: Install Claude Code (npm) + aigpt
- Updated aios-install.sh: Simplified installation flow
- Updated README.md: Focus on simplicity and practicality
Installation:
1. npm i -g @anthropic-ai/claude-code
2. Build aigpt from source
3. Configure .zshrc with aliases
4. Set up systemd-nspawn with bind mounts
Usage:
$ sudo machinectl shell aios
$ claude # or: ai
This commit implements the new direction for aios:
- AI conversation interface replaces traditional shell
- aigpt integration for shared memory across containers
- systemd-nspawn for environment isolation
Changes:
- Added aios-install.sh: Complete installer script
- Added cfg/mcp.json: MCP server configuration for aigpt
- Added cfg/config.toml: aios configuration with permission system
- Added cfg/nspawn/aios.nspawn: systemd-nspawn configuration
- Updated build.zsh: Integrated aigpt installation and setup
- Updated README.md: Documented new architecture and philosophy
Architecture:
User → AI Chat → Commands → Execution
↓
aigpt (shared memory)
↓
systemd-nspawn (isolated environment)
Philosophy:
Simply insert AI into existing flows (shell → AI chat)