lib/vagrant-nixos/provisioner.rb
def prepare!
        cleanup_hostname!
        cleanup_network!

        imports = ''

        # Find all /etc/nixos/vagrant-*.nix files
        machine.communicate.tap do |c|
          c.execute('find /etc/nixos -maxdepth 1 -type f -name "vagrant-*.nix"') do |type, data|
            imports << data
          end
        end

        # build
        conf = <<CONF
{ config, pkgs, ... }:
{
  imports = [
    #{imports.lines.join("    ").strip}
  ];
CONF
        # default NIX_PATH
        conf << <<CONF if config.NIX_PATH
  config.environment.shellInit = ''
    export NIX_PATH=#{config.NIX_PATH}:$NIX_PATH
  '';
CONF
        conf << '}'
        # output / build the config

        write_config("vagrant.nix", conf)
      end
# rebuild the base vagrant.nix configuration
rebuild the base vagrant.nix configuration
rebuild the base vagrant . nix configuration
def prepare!
        cleanup_hostname!
        cleanup_network!
        imports = ''
        machine.communicate.tap do |c|
          c.execute('find /etc/nixos -maxdepth 1 -type f -name "vagrant-*.nix"') do |type, data|
            imports << data
          end
        end
        conf = <<CONF
{ config, pkgs, ... }:
{
  imports = [
    #{imports.lines.join("    ").strip}
  ];
CONF
        conf << <<CONF if config.NIX_PATH
  config.environment.shellInit = ''
    export NIX_PATH=#{config.NIX_PATH}:$NIX_PATH
  '';
CONF
        conf << '}'
        write_config("vagrant.nix", conf)
      end
def prepare! cleanup_hostname! cleanup_network! imports = '' machine . communicate . tap do | c | c . execute ( 'find /etc/nixos -maxdepth 1 -type f -name "vagrant-*.nix"' ) do | type , data | imports << data end end conf = <<CONF 
{ config, pkgs, ... }:
{
  imports = [
     #{ imports . lines . join ( "    " ) . strip } 
  ];
 CONF conf << <<CONF if config . NIX_PATH 
  config.environment.shellInit = ''
    export NIX_PATH= #{ config . NIX_PATH } :$NIX_PATH
  '';
 CONF conf << '}' write_config ( "vagrant.nix" , conf ) end
rebuild the base vagrant.nix configuration
rebuild the base vagrant . nix configuration
# Find all /etc/nixos/vagrant-*.nix files # build # default NIX_PATH # output / build the config