investigate: evaluate nixos-anywhere-style bootstrap for NixOS containers #4

Open
opened 2026-04-15 09:57:56 +00:00 by mxm · 0 comments
Owner

Question

Can we generalize installation and bootstrap of our NixOS LXC containers using ideas/tools from the "Installing NixOS servers made EASY" workflow (kexec + nixos-anywhere + disko + deploy-rs), and should any part of that replace or refine our current homelab approach?

Background

This came up after seeing IogaMaster's video about automating NixOS server deployments. Our repo already has an active NixOS LXC migration and a draft architecture split between:

  • bootstrap/destructive rebuild via image/tarball workflow
  • day-2 updates via activation-based deployment

Relevant current context:

  • docs/architecture/nixos-lxc.md
  • docs/superpowers/specs/2026-04-05-nixos-lxc-simplification-rfc.md
  • docs/superpowers/plans/2026-04-05-nixos-lxc-simplification-roadmap.md
  • infra/src/homelab/build.py
  • infra/src/homelab/deploy.py

We should explicitly evaluate whether the server-oriented workflow from the video maps well to Proxmox LXC containers in this homelab, or whether only selected pieces are useful.

Areas to Investigate

  • Compare the video workflow to our current NixOS CT flow (homelab init/build/deploy/routes).
  • Evaluate each tool separately for LXC use:
    • kexec
    • nixos-anywhere
    • disko
    • deploy-rs
  • Determine which parts are applicable to Proxmox LXC containers vs bare metal / VMs only.
  • Assess benefits:
    • less manual setup
    • repeatability
    • rollback safety
    • lower cognitive load
    • easier host onboarding
  • Assess tradeoffs:
    • flexibility limits for LXC
    • fit with /data persistence model
    • coupling to root SSH / installer assumptions
    • operational complexity
    • build/deploy time
  • Estimate runtime characteristics:
    • bootstrap/install duration
    • iteration speed for ordinary changes
    • failure modes and rollback options
  • Decide whether the best outcome is:
    • keep current bootstrap path and only adopt deploy-rs for day-2
    • adapt nixos-anywhere ideas into our Python CLI
    • use a hybrid approach
    • reject this workflow as a poor fit for LXC
  • Produce a recommendation for the homelab with explicit notes for wow/villa CTs and current coexistence with Debian containers.

Deliverable

A short decision memo or RFC addendum that answers:

  1. What benefits we would get in this homelab.
  2. How flexible the approach is for Proxmox LXC containers.
  3. How well it fits our current NixOS migration architecture.
  4. Expected install/deploy time characteristics.
  5. Whether we should adopt all, some, or none of these tools.

If the answer is "some", include a concrete next step proposal.

## Question Can we generalize installation and bootstrap of our NixOS LXC containers using ideas/tools from the "Installing NixOS servers made EASY" workflow (`kexec` + `nixos-anywhere` + `disko` + `deploy-rs`), and should any part of that replace or refine our current homelab approach? ## Background This came up after seeing IogaMaster's video about automating NixOS server deployments. Our repo already has an active NixOS LXC migration and a draft architecture split between: - bootstrap/destructive rebuild via image/tarball workflow - day-2 updates via activation-based deployment Relevant current context: - `docs/architecture/nixos-lxc.md` - `docs/superpowers/specs/2026-04-05-nixos-lxc-simplification-rfc.md` - `docs/superpowers/plans/2026-04-05-nixos-lxc-simplification-roadmap.md` - `infra/src/homelab/build.py` - `infra/src/homelab/deploy.py` We should explicitly evaluate whether the server-oriented workflow from the video maps well to Proxmox LXC containers in this homelab, or whether only selected pieces are useful. ## Areas to Investigate - [ ] Compare the video workflow to our current NixOS CT flow (`homelab init/build/deploy/routes`). - [ ] Evaluate each tool separately for LXC use: - `kexec` - `nixos-anywhere` - `disko` - `deploy-rs` - [ ] Determine which parts are applicable to Proxmox LXC containers vs bare metal / VMs only. - [ ] Assess benefits: - less manual setup - repeatability - rollback safety - lower cognitive load - easier host onboarding - [ ] Assess tradeoffs: - flexibility limits for LXC - fit with `/data` persistence model - coupling to root SSH / installer assumptions - operational complexity - build/deploy time - [ ] Estimate runtime characteristics: - bootstrap/install duration - iteration speed for ordinary changes - failure modes and rollback options - [ ] Decide whether the best outcome is: - keep current bootstrap path and only adopt `deploy-rs` for day-2 - adapt `nixos-anywhere` ideas into our Python CLI - use a hybrid approach - reject this workflow as a poor fit for LXC - [ ] Produce a recommendation for the homelab with explicit notes for wow/villa CTs and current coexistence with Debian containers. ## Deliverable A short decision memo or RFC addendum that answers: 1. What benefits we would get in this homelab. 2. How flexible the approach is for Proxmox LXC containers. 3. How well it fits our current NixOS migration architecture. 4. Expected install/deploy time characteristics. 5. Whether we should adopt all, some, or none of these tools. If the answer is "some", include a concrete next step proposal.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mxm/homelab#4
No description provided.