From 76e6b817dea14b32fe53bc4c7b14297bf098a557 Mon Sep 17 00:00:00 2001 From: Cole Mickens Date: Sat, 17 Nov 2018 15:35:48 -0800 Subject: [PATCH] Update tools.sh 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. --- install-tools/bin/tools.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install-tools/bin/tools.sh b/install-tools/bin/tools.sh index 814edbe..7bc422d 100644 --- a/install-tools/bin/tools.sh +++ b/install-tools/bin/tools.sh @@ -89,7 +89,8 @@ do_install() { apply_user_data if ! nixos-install < /dev/null; then delete_user_data - fi + fin + nixos-install < /dev/null # apply second time to rebuild with new effective nix.* values notify.py installed touch /mnt/etc/.packet-phone-home