vagrant/plugins/guests/nixos/guest.rb

18 lines
441 B
Ruby
Raw Normal View History

2014-05-15 02:22:48 +00:00
require "vagrant"
module VagrantPlugins
module GuestNixos
class Guest < Vagrant.plugin("2", :guest)
def detect?(machine)
# For some reason our test passes on Windows, so just short
# circuit because we're not Windows.
if machine.config.vm.communicator == :winrm
return false
end
2014-05-15 02:22:48 +00:00
machine.communicate.test("test -f /run/current-system/nixos-version")
end
end
end
end