Hacker News new | past | comments | ask | show | jobs | submit login

On borderline, thinking to learn nix. Few questions:

Can I define VM images with nix? Can those VM images be loaded into VirtualBox? Also, possible to do similar to build AMIs or other cloud VMs such as Hetzner where my "Dockerfile" is a nix file which defines the system to be built and then it has everything in place once built including tools, libraries, configuration and such?

Thoughts?

EDIT: Typos





And for cloud/dedicated servers perhaps https://github.com/nix-community/nixos-anywhere

(There's also a terraform module ) And for state changes https://github.com/serokell/deploy-rs Or Colmena /nixops/ and x other

For secret handling perhaps https://github.com/ryantm/agenix/ + https://github.com/oddlama/agenix-rekey

The ecosystem is in my experience very well fleshed out (7 yrs of use), as long as you don't require a knowledgebase/wiki/ up2date documentation, it's not been a issue for me since I could always fall back on Linux knowledge and just looking for how other distributions do x / how the thing itself is configured , and looking at how perhaps a existing nix module wraps that


Oh I am converted! Will try to setup system using nix instead of packer.


Yes but with an asterisk. Nixos generators linked elsewhere is a really great tool to take a given nix configuration and build it for consumption in many contexts (eg i use the same one to both build initial proxmox vm images and then also update those running images). The problem is that you will need a hardware-configuration.nix that caters to the end environment. Ive worked around this by pre-generating it and then copying it into the result but I wish there was a better, less manual, process.


Yep for sure! We even have a neat upload-ami cli tool:

https://github.com/NixOS/amis


That's awesome! I think all the missing pieces are in place. :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: