diff --git a/plugins/guests/nixos/cap/nfs_client.rb b/plugins/guests/nixos/cap/nfs_client.rb new file mode 100644 index 000000000..1d71399e4 --- /dev/null +++ b/plugins/guests/nixos/cap/nfs_client.rb @@ -0,0 +1,11 @@ +module VagrantPlugins + module GuestNixos + module Cap + class NFSClient + def self.nfs_client_installed(machine) + machine.communicate.test("test -x /run/current-system/sw/sbin/mount.nfs") + end + end + end + end +end diff --git a/plugins/guests/nixos/plugin.rb b/plugins/guests/nixos/plugin.rb index edba634cb..3aceceeb7 100644 --- a/plugins/guests/nixos/plugin.rb +++ b/plugins/guests/nixos/plugin.rb @@ -20,6 +20,11 @@ module VagrantPlugins require_relative "cap/change_host_name" Cap::ChangeHostName end + + guest_capability("nixos", "nfs_client_installed") do + require_relative "cap/nfs_client" + Cap::NFSClient + end end end end