grahamc / packet-nixos

The images used by Packet.net's deployment process.
MIT License
33 stars 10 forks source link

tools.sh: apply configuration twice to pickup nix.* values #18

Open colemickens opened 5 years ago

colemickens commented 5 years ago

Fixes #14.

This will allow the user to supply a user data that set custom nix options (like a NIX_PATH to a specific nixpkgs and setting nix.buildCores = 0 on a beefy Packet EPYC machine).

It feels hacky, but also not that bad and solves a need without any heavy lifting. Please note, I don't have PXE infra setup to test this, and I'm making assumptions about nixos-install operating similarly to nixos-rebuild switch... hopefully you can validate @grahamc.