Commit Graph

108 Commits

Author SHA1 Message Date
170d4c21d4 fix actions 2026-02-27 17:22:28 +09:00
c84fe758d0 fix docker 2026-02-27 17:07:38 +09:00
31114ecd74 fix rootfs 2026-02-27 16:20:46 +09:00
2eb903ae4b fix images 2026-02-27 16:15:45 +09:00
29c47fbe9c fix cfg 2026-02-27 14:45:55 +09:00
71c4f2513b add pkg 2026-02-27 13:54:21 +09:00
c31240ec37 first 2026-02-27 13:40:15 +09:00
7bb8e0cd14 mv old 2026-02-27 13:10:44 +09:00
2f15b7fd00 update readme
Some checks failed
build and push image / Release (push) Failing after 1m18s
2026-02-27 13:03:03 +09:00
52a1408535 gitignore
Some checks failed
build and push image / Release (push) Failing after 1m20s
2026-02-27 12:53:14 +09:00
872bb0c432 add aishell
Some checks failed
build and push image / Release (push) Failing after 1m33s
2025-11-09 17:32:33 +09:00
27658209d3 fix zshrc
Some checks failed
build and push image / Release (push) Failing after 1m34s
2025-11-09 05:29:50 +09:00
18d2860397 fix ai user
Some checks failed
build and push image / Release (push) Failing after 1m18s
2025-11-09 05:26:32 +09:00
syui
66b416ebde Merge pull request #9 from syui/claude/aios-initial-direction-011CUrcij89bjpsbc7k8wQeo
Claude/aios initial direction 011 c urcij89bjpsbc7k8w qeo
2025-11-09 05:22:58 +09:00
Claude
b7b59f593a refactor: Enable workspace auto-entry with full sudo and skip permissions
- Restore workspace auto-entry on ai user login
- Use systemd-nspawn -q -D to enter workspace
- Start claude with --dangerously-skip-permissions (no approval needed)
- Grant wheel group full sudo access (NOPASSWD: ALL) for container operation
- ai user can perform all root operations via sudo in workspace
2025-11-08 20:17:02 +00:00
Claude
3d86677dd2 fix: Add network configuration to install.sh
- Create /etc/systemd/nspawn/aios.nspawn during installation
- Set Network Private=no to share host network
- Allows claude to connect to api.anthropic.com
- Fixes EAI_AGAIN network error
2025-11-08 19:44:20 +00:00
Claude
c20c49d5e0 fix: Remove unnecessary aios.zsh and config.json
- Delete aios-startup script copying and sourcing
- Delete config.json creation
- Simplify .zshrc to only include claude auto-start
- Fixes claude not starting on ai user login
2025-11-08 19:42:18 +00:00
syui
c93f972c4a Merge pull request #8 from syui/claude/aios-initial-direction-011CUrcij89bjpsbc7k8wQeo
Claude/aios initial direction 011 c urcij89bjpsbc7k8w qeo
2025-11-08 22:27:22 +09:00
Claude
5d7f06282e refactor: Simplify startup - user manages containers and MCP
Changes:
- Delete cfg/setup-claude.sh (MCP setup now manual)
- Remove restore container creation (user manages backups)
- Remove workspace auto-entry from .zshrc
- Remove MCP auto-registration
- Change ai user .zshrc to run claude once on login (not exec)
- User now manually starts containers and registers MCP as needed

New flow:
1. ai user auto-login
2. claude starts once (not exec, returns to shell after exit)
3. User manually starts workspace container if needed
4. User manually registers MCP servers
2025-11-08 13:04:28 +00:00
Claude
2162463382 Revert workspace.nspawn to simple configuration
- Remove incorrect nested container settings
- Audit error cannot be solved with nspawn config (kernel issue)
- Keep simple config: Boot=yes, Bind mount, no VirtualEthernet
- Works in production (aios as OS), not in test (nested container)
2025-11-07 20:00:21 +00:00
Claude
f965547b6c fix: Add nested container support to workspace.nspawn
- Add Capability=all for full capabilities
- Add SystemCallFilter=@keyring bpf for required syscalls
- Set PrivateUsers=no to avoid user namespace issues
- Set SuppressSync=false for Docker compatibility
- Fixes audit errors in nested systemd-nspawn containers
2025-11-07 19:54:07 +00:00
Claude
d3ea2cc78d 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
2025-11-07 19:06:30 +00:00
Claude
66f3fe4045 Revert to systemd-nspawn without manual bind mount
- Remove chroot approach
- Use systemd-nspawn -q -D directly
- workspace.nspawn config (Bind mount) will be automatically applied
- Simpler and cleaner approach
2025-11-07 19:02:01 +00:00
Claude
30ebfcf933 refactor: Use chroot instead of systemd-nspawn for workspace entry
- Replace systemd-nspawn with chroot to avoid nested container audit errors
- Add manual bind mount setup for /home/ai:/root sharing
- Add mount and chroot to sudoers permissions
- chroot avoids kernel audit subsystem conflicts in nested containers
2025-11-07 18:59:08 +00:00
Claude
66a5c6d16f refactor: Use systemd-nspawn directly instead of machinectl
- Replace machinectl shell with systemd-nspawn -q -D
- Add systemd-nspawn to sudoers permissions
- Simpler and more direct container entry
- No dependency on systemd-machined service
2025-11-07 18:57:53 +00:00
syui
62db018527 Merge pull request #7 from syui/claude/aios-initial-direction-011CUrcij89bjpsbc7k8wQeo
Claude/aios initial direction 011 c urcij89bjpsbc7k8w qeo
2025-11-08 03:28:49 +09:00
Claude
111fa7b828 fix: Remove Boot requirement from workspace to avoid audit error
- Remove Boot=yes from workspace.nspawn configuration
- Use machinectl shell directly without starting/booting container
- Avoids "Failed to reset audit login UID" error in nested containers
- machinectl shell works with non-booted containers via namespace entry
2025-11-07 18:14:24 +00:00
Claude
7b0cb8e183 fix: Remove PrivateUsers from workspace.nspawn to fix nested container issue
Error: Failed to adjust UID/GID shift of OS tree
Cause: Cannot use PrivateUsers inside a container that already uses it
Solution: Remove PrivateUsers=pick from workspace.nspawn
2025-11-07 18:05:16 +00:00
syui
2d98f58232 Merge pull request #6 from syui/claude/aios-initial-direction-011CUrcij89bjpsbc7k8wQeo
Claude/aios initial direction 011 c urcij89bjpsbc7k8w qeo
2025-11-08 02:33:23 +09:00
Claude
fe1f150634 refactor: Rename restore-img to restore 2025-11-07 17:30:25 +00:00
Claude
e62288c872 fix: Add backup step in user-continer.sh to prevent recursion
Without backup, cp -a root.x86_64 root.x86_64/var/lib/machines/workspace
creates incomplete containers (only var/ directory).

Solution: Backup before creating /var/lib/machines directory, then copy
the clean backup to workspace and restore-img.
2025-11-07 17:29:35 +00:00
syui
fd922287c0 Merge pull request #5 from syui/claude/aios-initial-direction-011CUrcij89bjpsbc7k8wQeo
chore: Clean up source directories after building aigpt and aibot
2025-11-08 02:18:06 +09:00
Claude
2773101035 chore: Clean up source directories after building aigpt and aibot
Remove gpt/ and bot/ directories after copying binaries to save disk space.
2025-11-07 17:17:05 +00:00
66a95b912b fix
Some checks failed
build and push image / Release (push) Failing after 1m27s
2025-11-08 02:07:29 +09:00
syui
68817ba8de Merge pull request #4 from syui/claude/aios-initial-direction-011CUrcij89bjpsbc7k8wQeo
Claude/aios initial direction 011 c urcij89bjpsbc7k8w qeo
2025-11-08 02:07:02 +09:00
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
b41052b9a8 feat: Implement user-dir sharing between ai user and workspace root
Perfect solution for aios concept:
- workspace.nspawn: Bind=/home/ai:/root
- ai user and workspace root share the SAME home directory
- Same .zshrc, .claude.json, .config, all data/settings/history
- INSIDE_WORKSPACE env var prevents infinite loop
- Flow: ai login → enter workspace → claude starts
- All configuration and memory perfectly shared
2025-11-07 16:45:12 +00:00
Claude
100471646e fix: Share claude config/memory between ai user and container
ai user now uses workspace container's claude via wrapper function.
This ensures ai user and container root share the same:
- claude configuration
- MCP settings
- conversation history/memory

Flow:
1. ai user login → workspace starts
2. ai user runs 'claude' → calls workspace container's claude
3. Container root runs 'claude' → same claude instance
4. Configuration and memory are shared
2025-11-07 16:40:54 +00:00
Claude
5264e9866c feat: Implement aios core concept - start from container with claude
Implemented the 3 core requirements:
1. Auto-login as ai user (already done)
2. ai user automatically starts workspace container on login
3. Container root automatically starts claude with MCP

Flow:
aios boot → ai user auto-login → workspace starts → enter workspace as root → claude auto-starts

Changes:
- ai user .zshrc: auto-start workspace and exec into it
- root .zshrc: auto-start claude with MCP
- Moved user-continer.sh to after setup-claude.sh to include all configs
2025-11-07 16:35:01 +00:00
Claude
1ca53c489c fix: Create child containers before user setup
Moved user-continer.sh execution before setup-user.sh.
Child containers are created by root for root to use, not for ai user.
2025-11-07 15:32:45 +00:00
Claude
d1c3ab94cb refactor: Remove unnecessary backup step in container creation
Simplified user-continer.sh by removing temp backup.
Directly copy aios to workspace and restore-img.
2025-11-07 15:30:17 +00:00
Claude
fd25a50395 refactor: Simplify child container creation by copying aios itself
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
2025-11-07 15:25:01 +00:00
Claude
642ccb28a6 refactor: Create child containers during build as root, not at ai user login
- 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
2025-11-07 15:21:14 +00:00
syui
d575a489ce Merge pull request #3 from syui/claude/aios-initial-direction-011CUrcij89bjpsbc7k8wQeo
Claude/aios initial direction 011 c urcij89bjpsbc7k8w qeo
2025-11-08 00:15:24 +09: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
1aab33cb04 feat: Add automatic workspace container initialization on first login
- 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
2025-11-07 14:54:51 +00:00
Claude
cdf38812fc fix: Add securetty config and enable systemd-machined for container operations
- 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
2025-11-07 14:50:03 +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