Closed PierreR closed 4 years ago
@PierreR @KyleOndy Let me know once you managed to build and test this PR successfully
@zimbatm Everything works on my side except for the weird error I had yesterday:
=> virtualbox-iso: warning: unable to download 'https://nixos.org/channels/nixos-19.09': Couldn't resolve host name (6); retrying in 343 ms
As it worked perfectly before on the same channel, I suspect a timeout issue or something due to the heavy load caused by the release.
If I remove these 3 lines from postinstall.sh then everything is fine and the build completes without issues:
nix-channel --add https://nixos.org/channels/nixos-19.09 nixos
nix-channel --update
nixos-rebuild switch --upgrade
That brings the question, why do we need these lines in the first place ?
I would argue the first two lines makes more harm than good. The right channel is already set in the iso. In the worse case scenario we might end up replacing the right channel with the wrong one (as we forgot to update the postinstall.sh file while updating to a release).
The last line, update the channel to the latest reference which looks like a bad idea to me. Indeed by doing so we prevent the process to be reproducible and we end up in a state that doesn't match the declared inputs. I don't see the point. I would argue it is best to let the user make the upgrade while he start using the produced artifact.
@zimbatm If you agree with all of this I will remove these 3 lines in this PR and tell you it has been tested successfully on my side.
Also the --upgrade
flag passed to nixos-rebuild
is redundant since nix-channel --update
has been called just before.
I don't mind removing those lines, just make sure that the system has the right channel available after the install.
@zimbatm I have just tested this again and everything is fine on my side. I have double checked and the channel is correctly defined with the 3 lines removed. As far as I am concerned it is good to merge.
:tada:
Fix #46
@zimbatm Do you mind reviewing this PR carefully. I will be tested it in the new few days.