2014-05-15 02:22:48 +00:00
|
|
|
require "vagrant"
|
|
|
|
|
|
|
|
module VagrantPlugins
|
|
|
|
module GuestNixos
|
|
|
|
class Guest < Vagrant.plugin("2", :guest)
|
|
|
|
def detect?(machine)
|
2014-08-06 18:17:41 +00:00
|
|
|
# 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
|