From ae04786633c7b3118a5889f2f8263db3ca0bb442 Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Tue, 4 Feb 2025 06:31:29 +0100 Subject: [PATCH] Update readme with deployment and update instructions --- README.md | 20 ++++++++++++++++++++ flake.nix | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f68ced3..0084435 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,25 @@ # Home lab configuration The nix based configuration for my home lab. + +## Deploying a new VM +1. Create a clone of the template VM in proxmox. +2. Change cloud-init config of the clone to contain the new IP address. +3. Create the configuration file in the `hosts/` folder. +4. Make sure the IPs match between the configuration file and the cloud-init config. +5. Create a secrets file with `sops edit secrets/HOSTNAME.yml` and put all required secrets in there. +6. Commit changes to git. +7. Start the VM. +8. Deploy the configuration with `colmena apply HOSTNAME`. +9. (Optional) If the VM requires an update to traefik run `colmena apply` to update all hosts. + + +## Updating packages +1. Run `nix flake update`. +2. Commit the changes to git. +3. Run `colmena apply`. + + ## File Organization ``` - hosts/ # Host definitions files @@ -16,6 +35,7 @@ The nix based configuration for my home lab. ### Traefik HTTP reverse proxy. + ## TODO: ### Services **For sure**: diff --git a/flake.nix b/flake.nix index 97392b4..0ebe651 100644 --- a/flake.nix +++ b/flake.nix @@ -26,7 +26,10 @@ in { devShells.x86_64-linux.default = pkgs.mkShell { - buildInputs = [ pkgs.colmena ]; + buildInputs = with pkgs; [ + colmena + sops + ]; }; colmena = {