Torjus Håkestad 408554b477
Some checks failed
Run nix flake check / flake-check (push) Failing after 1m50s
Run nix flake check / flake-check (pull_request) Failing after 1m49s
scripts: add create-host tool for automated host configuration generation
Implements Phase 2 of the automated deployment pipeline.

This commit adds a Python CLI tool that automates the creation of NixOS host
configurations, eliminating manual boilerplate and reducing errors.

Features:
- Python CLI using typer framework with rich terminal UI
- Comprehensive validation (hostname format/uniqueness, IP subnet/uniqueness)
- Jinja2 templates for NixOS configurations
- Automatic updates to flake.nix and terraform/vms.tf
- Support for both static IP and DHCP configurations
- Dry-run mode for safe previews
- Packaged as Nix derivation and added to devShell

Usage:
  create-host --hostname myhost --ip 10.69.13.50/24

The tool generates:
- hosts/<hostname>/default.nix
- hosts/<hostname>/configuration.nix
- Updates flake.nix with new nixosConfigurations entry
- Updates terraform/vms.tf with new VM definition

All generated configurations include full system imports (monitoring, SOPS,
autoupgrade, etc.) and are validated with nix flake check and tofu validate.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 02:27:57 +01:00
2024-12-05 18:35:06 +01:00
2026-01-18 03:58:55 +01:00
2025-12-06 11:37:11 +01:00
2025-04-01 22:23:59 +02:00
2026-01-18 03:58:55 +01:00
2026-01-29 00:01:06 +00:00
2024-10-07 23:40:28 +02:00
2025-01-26 00:55:15 +01:00

nixos-servers

Nixos configs for my homelab servers.

Configurations in use

  • ha1
  • ns1
  • ns2
  • template1
Description
No description provided
Readme 2.2 MiB
Languages
Nix 56.7%
Python 22.8%
HCL 12.6%
Smarty 4%
Shell 3.2%
Other 0.7%