Skip to content

iacker/agentic-os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentic OS

Agentic OS

An opinionated NixOS-WSL setup where AI tools are system packages, not ad-hoc installs.

NixOS WSL2 Docker AI Agents License

Why | Features | Quick Start | What's Included | Architecture


Why

Your dev environment shouldn't break. Your AI tools shouldn't be scattered across npm, pip, and random binaries.

npm install, pip install, curl | bash  -->  replaced by one flake.

Because environments drift. And drift kills focus.

agentic-os treats AI coding assistants as first-class system dependencies — declarative, reproducible, and update-controlled.

# New PC? One command. Same environment.
sudo nixos-rebuild switch --flake .#wsl

Features

agentic-os is not a dotfiles repo. It's an operating system profile.

AI-Native OS

  • 5 AI coding agents built into the system
  • Controlled updates via nix flake update llm-agents
  • Custom derivations for tools not in nixpkgs (e.g., Docker cagent)

Reproducibility and Safety

  • Same config = same environment, guaranteed
  • Instant rollback: nixos-rebuild switch --rollback
  • Generations history for full traceability

WSL-First Design

  • Config lives on Windows filesystem — survives WSL resets
  • Native Docker daemon — no Docker Desktop license needed
  • VS Code Remote compatible via nix-ld

Quick Start

Prerequisites

  • Windows 11 + WSL 2.4.4+
  • NixOS-WSL installed

Install

# Clone to Windows filesystem (resilient location)
cd /mnt/c/Users/<your-user>
git clone https://github.com/iacker/agentic-os.git
cd agentic-os

# Build your AI-native OS
sudo nixos-rebuild switch --flake .#wsl

# Reconnect for docker group
exit

Verify

# Proof: AI tools are now system binaries
which claude gemini codex opencode cagent

What's Included

AI Coding Agents

Command Provider Source
claude Anthropic llm-agents flake
gemini Google llm-agents flake
opencode SST llm-agents flake
codex OpenAI nixpkgs
cagent Docker custom derivation

CLI Tools

Category Tools
Navigation fzf, ripgrep, fd, lsd, bat
Data jq, yq
Network curl, wget, htop
Git git, gh, lazygit
Dev python312, nodejs_22

Neovim + LazyVim

Pre-configured with LSP servers and formatters:

LSP Servers Languages
nil Nix
lua-language-server Lua
typescript-language-server TypeScript/JavaScript
bash-language-server Bash
yaml-language-server YAML
pyright Python
gopls Go
rust-analyzer Rust
terraform-ls Terraform
marksman Markdown
Formatters/Linters
stylua Lua
shellcheck, shfmt Shell
black Python
alejandra Nix

LazyVim starter auto-installs on first rebuild.

Docker

  • Native daemon (no Docker Desktop)
  • Auto-prune enabled
  • Starts on boot

VS Code Remote

nix-ld configured with common libraries for seamless VS Code Remote-WSL support.


Architecture

flake.nix                 # Entry point + inputs
├── hosts/wsl.nix         # WSL system configuration
└── modules/
    ├── ai-cli.nix        # AI agents as system packages
    ├── docker.nix        # Docker daemon with auto-prune
    ├── lazyvim.nix       # Neovim + 10 LSP servers + formatters
    ├── tools.nix         # CLI tools (git, fzf, ripgrep...)
    └── vscode.nix        # nix-ld for VS Code Remote

Each module is a reusable, declarative system capability.


Daily Workflow

# Update AI tools only
nix flake update llm-agents
sudo nixos-rebuild switch --flake .#wsl

# Update everything
nix flake update
sudo nixos-rebuild switch --flake .#wsl

# Something broke? Rollback instantly
sudo nixos-rebuild switch --rollback

# List all generations
sudo nix-env -p /nix/var/nix/profiles/system --list-generations

# Test a package without installing
nix-shell -p <package>

The CLAUDE.md Contract

This repo includes a CLAUDE.md file — instructions for AI assistants working on this codebase.

This repo is AI-readable by design.

It defines project structure, essential commands, and conventions so Claude Code (and other AI tools) can collaborate effectively on your system configuration.


Customization

Everything is modular by design. You never touch the base system.

Add a package

# Edit the relevant module
nvim modules/tools.nix

# Add your package to environment.systemPackages

# Apply
git add .
sudo nixos-rebuild switch --flake .#wsl

Add a new module

  1. Create modules/mymodule.nix
  2. Import it in hosts/wsl.nix
  3. Rebuild

Resources


License

MIT


Stop configuring. Start building.

About

NixOS ai workstation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages