Commit Graph

26 Commits

Author SHA1 Message Date
9459839d74 fix: restrict docker commands for ai-worker user
Remove ai-worker from docker group and enforce sudo whitelist.

SECURITY: Being in the docker group gives unrestricted access to the
Docker daemon socket (/var/run/docker.sock), allowing any docker command:
docker exec, docker cp, docker run -v /:/host, docker commit, etc.

Changes:
- Remove extraGroups = ["docker"] from ai-worker user definition
- Add comprehensive sudo NOPASSWD whitelist for safe docker subcommands
  ALLOWED: ps, inspect, logs, images, info, version, stats, start, stop,
  restart, rm, rmi, wait, pull, build, run, compose, system,
  network ls, volume ls
  BLOCKED (implicitly): exec, cp, commit, diff, export, import, load,
  save, attach, push, tag, create, plugin, network create, volume create
- Update ai-worker-restricted.nix module to reflect new approach
- Update README-ai-worker.md with new security model and examples

All docker commands must now be prefixed with sudo.
The Hermes agent's host_run tool needs to be updated to prepend sudo.
2026-05-20 20:34:19 -04:00
Robert
f722af7803 New ollama model creator module version 2026-05-10 16:56:09 -04:00
Robert
7d3d072961 Merge branch 'master' into ai-worker-restricted-access 2026-05-03 05:28:39 -04:00
Robert
bcf5cadaa0 olllama template fix to remove currenttime 2026-04-30 21:54:47 -04:00
f0e21d95e4 fix: ai-worker docker-only access for ollama benchmarking
Remove infra repo bind mount and sudo access from ai-worker user.
Now ai-worker can only:
- SSH into host from Hermes container
- Run docker commands via docker group membership
- Execute ollama benchmarks via docker exec

Results saved to /opt/data/ai-optimizer/ in Hermes container.
2026-04-29 19:55:19 +00:00
18df45819d Add restricted AI worker access with deployment capabilities
- New module: modules/nixos/security/ai-worker-restricted.nix
  - Bind mount for infra repo access (RW)
  - Whitelisted sudo commands: nh, nixos-rebuild, nixpkgs-fmt, nix
  - Audit logging for infra changes
  - Documentation in README-ai-worker.md

- Updated users/ai-worker.nix:
  - Enable services.aiWorkerAccess
  - Lock password (SSH key only)
  - Security documentation comments

- Updated flake.nix:
  - Include new security module

SECURITY: AI must ask for user confirmation before running nh os switch
2026-04-28 15:34:38 +00:00
Robert
cf1373cd68 Forced restart for docker services 2026-04-27 06:02:25 -04:00
Robert
c579b07843 fix: read gateway token from secret file via bash 2026-04-04 17:49:39 -04:00
Robert
d3f50cdadc fix: always restart node service on exit 2026-04-04 17:43:03 -04:00
Robert
2e749228bb fix: set correct working directory and create home for ai-worker 2026-04-04 17:07:13 -04:00
Robert
401b23ce46 feat: add openclaw node service and migrate to lix
- Add headless openclaw node systemd service for host execution
- Migrate from nix to lix package manager
- Permit openclaw-2026.3.12 (insecure package warning)
- Use ai-worker user for node service
2026-04-04 16:26:33 -04:00
13dbf18f67 Progress dump before ai agent 2026-04-04 04:57:47 -04:00
0845262c05 style: format Nix files after modifications 2026-01-01 14:32:17 -05:00
b59f8952ac feat(4-2): Test and document web search capabilities through MCP servers
- Started OpenCode service and verified it's running
- Tested Context7 web search functionality
- Tested DuckDuckGo web search functionality
- Documented web search integration in open_code_server.nix
- Updated ROADMAP and STATE with completion status
- Phase 4 complete, ready for Phase 5: TAK Server Integration
2026-01-01 14:30:42 -05:00
d92e1426ba chore: update service modules and remove deprecated systemd services 2026-01-01 02:25:25 -05:00
0b4e9e092d chore: add docker stack integration with improved service management 2026-01-01 02:25:05 -05:00
b54760f62b docs: initialize NixOS infrastructure with AI assistant
Creates PROJECT.md with vision and requirements.
Creates config.json with interactive workflow mode.
2026-01-01 01:36:58 -05:00
e2b040e5f0 Simpler path copy for compose files 2025-12-27 17:14:22 -05:00
a49c4f40e5 Merge branch 'master' of ssh://code.lazyworkhorse.net:2222/gortium/infra 2025-08-24 19:33:44 -04:00
955c3255a0 WIP on host ssh key. broken. 2025-08-17 17:26:59 -04:00
6b367a7c95 WIP on fan control 2025-08-15 21:15:59 -04:00
4c7f22b903 Fixed typo 2025-08-09 00:05:47 +00:00
4b3eef4150 Minor changes 2025-08-08 18:18:47 -04:00
857f0daa95 Starting work on fan control with opencode 2025-08-08 18:18:21 -04:00
911f3589a2 Used agenix to manage secrets, 4 services up, ssh 2025-08-08 17:00:47 -04:00
ac6c3688ef Some more work toward a modular config 2025-08-04 22:15:59 -04:00