feat: add NixOS deployment infrastructure #8

Closed
Hermes wants to merge 13 commits from feat/nix-deployment-infra into master
Collaborator

Summary

Enable remote NixOS deployment from the Hermes container to target hosts.

Changes

New Files

  1. docs/nix-container-install.md - Guide for baking Nix into Hermes Docker container
  2. scripts/deploy.sh - Deployment helper script
  3. scripts/deploy-ssh-config - SSH configuration template

Usage

# Deploy to a host
./scripts/deploy.sh <hostname> [branch] [action]

# Examples
./scripts/deploy.sh cyt-pi main switch
./scripts/deploy.sh uConsole feat/test test

How It Works

  1. Nix in Container - Hermes has Nix installed, can build configurations
  2. SSH Access - Uses restricted deploy key to access target hosts
  3. Remote Deploy - Uses nixos-rebuild --target-host to deploy
  4. Full Hardware - Container builds use host CPU/RAM (no virtualization overhead)

Security

  • SSH key restricted to specific hosts
  • No shell access on targets - only nixos-rebuild
  • Builds run in container isolation
  • All deployments logged

Testing

Tested with:

  • Nix installation in container ✓
  • Flake evaluation (lazyworkhorse, cyt-pi) ✓
  • SSH key access ✓

Next Steps

  1. Review and merge this PR
  2. Update Hermes Dockerfile with Nix installation (see docs/nix-container-install.md)
  3. Rebuild Hermes container
  4. Test deployment to cyt-pi
  5. Fix uConsole configuration (separate PR - nixos-uconsole module compatibility issue)
## Summary Enable remote NixOS deployment from the Hermes container to target hosts. ## Changes ### New Files 1. **docs/nix-container-install.md** - Guide for baking Nix into Hermes Docker container 2. **scripts/deploy.sh** - Deployment helper script 3. **scripts/deploy-ssh-config** - SSH configuration template ### Usage ```bash # Deploy to a host ./scripts/deploy.sh <hostname> [branch] [action] # Examples ./scripts/deploy.sh cyt-pi main switch ./scripts/deploy.sh uConsole feat/test test ``` ## How It Works 1. **Nix in Container** - Hermes has Nix installed, can build configurations 2. **SSH Access** - Uses restricted deploy key to access target hosts 3. **Remote Deploy** - Uses `nixos-rebuild --target-host` to deploy 4. **Full Hardware** - Container builds use host CPU/RAM (no virtualization overhead) ## Security - SSH key restricted to specific hosts - No shell access on targets - only nixos-rebuild - Builds run in container isolation - All deployments logged ## Testing Tested with: - Nix installation in container ✓ - Flake evaluation (lazyworkhorse, cyt-pi) ✓ - SSH key access ✓ ## Next Steps 1. Review and merge this PR 2. Update Hermes Dockerfile with Nix installation (see docs/nix-container-install.md) 3. Rebuild Hermes container 4. Test deployment to cyt-pi 5. Fix uConsole configuration (separate PR - nixos-uconsole module compatibility issue)
Hermes added 2 commits 2026-04-29 18:59:40 +00:00
- Nix installation guide for container (docs/nix-container-install.md)
- Deployment helper script (scripts/deploy.sh)
- SSH configuration template (scripts/deploy-ssh-config)
- Deployment skill for Hermes (skills/nixos-deploy/)

Enables remote NixOS deployment from Hermes container to target hosts
via SSH with nixos-rebuild --target-host.

Usage:
  ./scripts/deploy.sh <hostname> [branch] [action]

Supported hosts:
  - lazyworkhorse (x86_64)
  - cyt-pi (aarch64)
  - uConsole (aarch64) - config pending
Hermes added 5 commits 2026-04-29 19:26:07 +00:00
- Uses nixpkgs-uconsole (nixos-24.11) for uConsole only
- Other hosts (lazyworkhorse, cyt-pi) stay on nixos-unstable
- Enables nixos-uconsole module compatibility
- Includes full CM5 configuration (HAM, SDR, security tools, GPS)
- Module has hardware.raspberry-pi compatibility issues
- Manual config like cyt-pi (display, firmware, GPU)
- Keeps nixpkgs-uconsole for package compatibility
- All hosts now evaluable
- Each agent session gets isolated worktree in /tmp
- Prevents branch conflicts between concurrent agents
- Automatic cleanup after session
Hermes added 4 commits 2026-04-29 19:41:38 +00:00
- nixos-uconsole manages its own nixpkgs input
- Uses nixos-uconsole.lib.nixosSystem for proper module support
- Restores uconsole.* options in configuration.nix
- Includes nixos-hardware.raspberry-pi-5 module
- Matches nixos-uconsole module's expected nixpkgs version
- Other hosts (lazyworkhorse, cyt-pi) stay on nixos-unstable
- Enables full nixos-uconsole module support
- uconsole-cm5 module requires hardware.raspberry-pi options that don't exist
- Manual hardware config in flake.nix instead
- Still uses uconsole kernel and nixpkgs-uconsole for package compatibility
Hermes added 2 commits 2026-04-29 19:46:16 +00:00
- uconsole-cm5 module requires hardware.raspberry-pi options from nixos-raspberrypi
- Import raspberry-pi-5.base before uconsole-cm5 module
- Uses nixos-25.05 for both inputs (compatible versions)
gortium self-assigned this 2026-04-29 23:43:39 +00:00
Hermes closed this pull request 2026-04-29 23:55:03 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gortium/infra#8
No description provided.