I thought about adding a link, but am a bit hesitant to de-anonymize myself on here 😅
But it's basically this:
- Proxmox is not Nix configured. There's a project for that, but IMO t'll take a couple of years to be ready for production.
- I've created a custom nix module that essentially just sets my default values for stuff like bios type, boot order,... And allows to set CPU cores, RAM, IP,...
- all this does though is just setting the corresponding values from the nixos-generators proxmox output
- additionally, all the usual stuff is handled (user, known ssh keys, base config of the system)
- for each VM, I only have a single file containing the VM settings (ID, RAM, cpu, ip,...) and the service config for whatever the VM is for
- then lastly I have a custom script/shell that essentially just allows to do "nixvm-new " which generates the image, moves it to the nas, and calls on proxmox to import the image, plus some cleanup
TBH this sounds way more complicated than it is / feels to use 😄
Im Prinzio erlaubt Nix dir, dein komplettes System (von Networking über User und Pakete, bis zu all deinen dotfiles) in einer einzigen, deklarativen config festzuhalten.
Dein System kann dann mit einem command vollständig von 0 nach betriebsbereit neu gebaut werden.
Kann sehr empfehlen mal aif YouTube danach zu suchen, das Thema ist bisschen zu umfangreich für ein Kommentar 😅