feat: moar nix

This commit is contained in:
nullishamy 2025-06-18 21:41:53 +01:00
parent 7e3bf4d6f3
commit 2025eb74a4
Signed by: amy
SSH key fingerprint: SHA256:WmV0uk6WgAQvDJlM8Ld4mFPHZo02CLXXP5VkwQ5xtyk
23 changed files with 1408 additions and 15 deletions

View file

@ -1,3 +1,27 @@
# nixlab
The Nix part of my homelab, just messing around
## boostrap
TODO: Figure out if addNetworking is required still
- Set `addNetworking` to `false` in `config/tf.nix`
- `just deploy`
- Wait for the infra to build
- Start the containers and log in to them
- Redeploy infra with `addNetworking`
- Put the `host-key.pub` into `~/.ssh/authorized_keys` on each host
- (This wil fail) `just deploy`
- Fetch the SSH keys of the hosts and put them in `secrets/secrets.nix`
- Remember to add it to `systems`!
- Rekey the secrets with `just rekey`
- `just deploy`
- Wait for the deploy
- Set the IPs properly in `flake.nix` (using the TF config as a ref)
- Reboot the nodes
## ref
- https://nixos.wiki/wiki/Proxmox_Linux_Container
- https://github.com/ryantm/agenix
- https://registry.terraform.io/providers/Telmate/proxmox/latest/docs/resources/lxc
- https://terranix.org/documentation/flakes.html
- https://discourse.nixos.org/t/qbittorrent-headless-service-module/32397