Closed cdituri closed 4 years ago
Thanks for the review @zimbatm, much appreciated :+1: crazy at work atm so aiming to circle back here sometime over the weekend to incorporate your feedback.
This is going to be hard to maintain as it requires the user to have HyperV installed. But there isn't much we can do, this is the current packer design.
Totally understand, re: maintenance and packer design. I just want more NixOS! and as long as Windows is the preference at my employer, more than happy to help maintain this native Hyper-V builder :smiley:
Sounds good. Let me know when it's ready to be merged :)
@zimbatm pull request is ready to merge at the moment. Some things worth nothing below first however:
iso_urls_update.rb
. @shajra-simspace left a comment in #59 switching the implementation from regex parsing to XML parsing. It's a more robust implementation, and I've included an attributed commit 1201013e103228f80683efd5e224fff78b7e8a22.@shajra-simspace hope you're ok with the above approach. Any thoughts, or would you like things attributed differently, etc? see the commit link.
NixOS 20.03 has changed users.group
and users.users
and are depreciating the current form. For nix-community/nixbox
I've left things as-is, as it;s the most graceful approach (ie backwards compatible when building <= NixOS 20.03), and warns adequately while building. See NixOS/nikpkgs/pull/63103 and the below.
thanks!
Overview
This pull request adds
hyperv-iso
builder support tonix-community/nixbox
:!!! Important: the last commit in the series brings
iso_urls.json
,nixos-i686.json
, andnixos-x86_64.json
to current. This is note-worthy because it looks like NixOS upstream is now using a 'latest'.iso
release, and we leverage that new approach here as well.Steps
Run packer build:
Import resultant vagrant
.box
image:Run vagrant:
Final note: many individuals on Windows have
git config --global core.autocrlf true
set, myself included. Havingautocrlf
set caused the following error during packer build, after a fresh clone:If you see this error, its because
scripts/{install, post-install}.sh
need to be LF; andgit
on Windows has presumably checked them out with CRLF line-endings on clone/checkout.