[Nix-dev] vagrant-nixos-plugin

zimbatm zimbatm at zimbatm.com
Sun Oct 18 22:28:33 CEST 2015


Hello,

Thanks for the pointer Charles.

I had a look at the Vagrant source code and support for generating the
/etc/nixos/vagrant-hostname.nix and /etc/nixos/vagrant-network.nix file has
been stable since release v1.6.4. What I didn’t see is any invocation
to nixos-rebuild
switch so I’m not really sure how the configuration is applied. The
simplest way to apply those changes would be to add a shell provisioner.
One downside of that approach is that vagrant provision has to be called
explicitly after config changes, cycling the machine power isn’t enough.

config.provisioner :shell, inline: "nixos-rebuild switch"

It wasn’t necessarily clear if the main vagrant project would accept such
os-specific provisioner so in the end I just removed the duplicate
functionality in the vagrant-nixos-plugin plugin.

Release v0.1.1 is a much cleaner version of the plugin and does just the
provisioning bits.

One notable addition is that just adding the following statement inside of
the configuration is enough to provision hostname or networking changes
(but vagrant provision still needs to be called explicitly):

config.provisioner :nixos

Link to gem: https://rubygems.org/gems/vagrant-nixos-plugin

z
​

On Wed, 2 Sep 2015 at 07:45 Christian Theune <ct at flyingcircus.io> wrote:

> Hi,
>
> great! Thanks for digging this up. I’ll check that.
>
> Christian
>
> On 02 Sep 2015, at 05:38, Charles Strahan <charles at cstrahan.com> wrote:
>
> Hello,
>
> I'd like to point out that I got (some) support for NixOS baked-into
> vagrant itself a while back:
>
> https://github.com/mitchellh/vagrant/pull/3830
>
> Might be worth looking at touching-up/rewriting as you see fit, rather
> than creating a plugin (unless you prefer that release model).
>
> -Charles
>
> On Tue, Sep 1, 2015, at 04:19 PM, Alexander Flatter wrote:
>
> Hello Christian,
>
> this is great - I’m looking forward to play with this.
>
>
> On 01 Sep 2015, at 22:14, Christian Theune <ct at flyingcircus.io> wrote:
>
> Hi,
>
> even though the "vagrant-nixos” plugin was featured on the Twitter feed
> recently - the original author seems to be MIA and Zimbatm and I want to
> move forward. We’ve been trying to get in contact for a couple of months
> now and we thought it’s time to fork and move on.
>
> We have created “vagrant-nixos-plugin” [1] (yeah, we’re screwed, the name
> of the ruby gem is gone until the original Chris reappears) and forked it
> on Github. We’re currently working on cleaning it up, getting a few bugs
> that have been annoying Zimbatm and me, and then also provide pre-baked
> 15.09 Vagrant images.
>
> This will take a couple of days, but if anyone wants to jump onboard,
> you’re obviously welcome.
>
> At some point we think it could be worthwhile to move those repositories
> (for the Vagrant imaging and the plugin) under the NixOS team umbrella.
>
> Cheers,
> Christian
>
> [1] https://github.com/zimbatm/vagrant-nixos-plugin
>
>> Christian Theune · ct at flyingcircus.io · +49 345 219401 0
> Flying Circus Internet Operations GmbH · http://flyingcircus.io
> Forsterstraße 29 · 06112 Halle (Saale) · Deutschland
> HR Stendal HRB 21169 · Geschäftsführer: Christian. Theune, Christian.
> Zagrodnick
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
> *_______________________________________________*
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
> Email had 1 attachment:
>
>    - signature.asc
>      1k (application/pgp-signature)
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
>> Christian Theune · ct at flyingcircus.io · +49 345 219401 0
> Flying Circus Internet Operations GmbH · http://flyingcircus.io
> Forsterstraße 29 · 06112 Halle (Saale) · Deutschland
> HR Stendal HRB 21169 · Geschäftsführer: Christian. Theune, Christian.
> Zagrodnick
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20151018/5494b5f4/attachment.html 


More information about the nix-dev mailing list