nix-community / nixbox

NixOS Vagrant boxes [maintainer=@ifurther]
https://app.vagrantup.com/nixbox/
MIT License
304 stars 101 forks source link

Update to 19.09 #49

Closed PierreR closed 4 years ago

PierreR commented 4 years ago

Fix #46

@zimbatm Do you mind reviewing this PR carefully. I will be tested it in the new few days.

zimbatm commented 4 years ago

@PierreR @KyleOndy Let me know once you managed to build and test this PR successfully

PierreR commented 4 years ago

@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.

zimbatm commented 4 years ago

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.

PierreR commented 4 years ago

@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.

zimbatm commented 4 years ago

:tada: