feat(nixos): integrate agent VM into host configurations

This commit is contained in:
2026-10-22 10:20:30 +08:00
parent d71fab81d5
commit 5c2e25b989
14 changed files with 826 additions and 28 deletions
+6
View File
@@ -14,6 +14,7 @@ nixos/
│ ├── README.md
│ ├── desktop.nix # 桌面机
│ ├── server.nix # 服务器
│ ├── agent.nix # AI agent VM(不引入 Docker/免密 sudo)
│ ├── wsl.nix # WSL (Debian/Windows)
│ ├── virtualbox.nix # VirtualBox 虚拟机
│ └── lxc.nix # Proxmox LXC 容器
@@ -53,6 +54,7 @@ nixos/
│ └── nvchad.nix # Neovim (NvChad)
├── hosts/ # 主机专属配置
│ ├── README.md
│ ├── agent/ # AI agent VM + Home Manager + hardware
│ ├── desktop/ # 桌面机(AMD + NVIDIA)
│ ├── server/ # 服务器
│ ├── wsl/ # WSL (NixOS-WSL)
@@ -66,6 +68,7 @@ nixos/
| 主机 | 角色 | 架构 | 说明 |
|------|------|------|------|
| `agent` | agent | x86_64-linux | AI Agent VM,CERNET 镜像与 Mihomo TUN |
| `desktop` | desktop | x86_64-linux | 桌面机,NVIDIA + AMD 双显卡 |
| `server` | server | x86_64-linux | 服务器 |
| `nixos-wsl` | wsl | x86_64-linux | WSL |
@@ -81,6 +84,9 @@ sudo nixos-rebuild switch --flake .#desktop
# 仅构建不切换
sudo nixos-rebuild build --flake .#server
# AI Agent VM:保留独立的 SSH、sudo 和 Mihomo 设置
sudo nixos-rebuild switch --flake .#agent
# 更新 flake lock
nix flake update