# 1.0 Samba is installed by default. The network-shared folder is at /home/<user>/share.
# 1.1 On host, set a password for the autentication of the samba server
# 1.2 $ smbpasswd -a <user>
# 1.3 Give password twice
# 1.4 On windows, open file explorer, right click "This PC", Map network drive...
# 1.5 fill in address: \\<ip-address>\share
# 1.6 Log in with details entered beforehand
#
# 2. Since this setup make use of iommu, you can pass through external usb hard drives or a specific PCI storage devices
# 2.1 Open details of virtual desktop in virt-manager
# 2.2 Add hardware
# 2.3 USB Host Device
# 2.4 Select device and launch virtual desktop
#
# 3. Set up shared folders in windows guest that can be accessed by host
# 3.0. Enable above service gvfs (this is used in the file manager to actually connect to the windows directory)
# 3.1. Log in to Windows
# 3.2. Go to "Network and Sharing Center"
# 3.3. Click "Change advanced sharing settings" and enable all settings for Private, Guest or Public and All Networks
# 3.3.1. Under "All Networks" you can disable "Password protected sharing" but it seems for optimal use, it's better to still give the password in the file manager
# 3.4. (possibly optional), select a folder and click "Properties", "Sharing", "Advanced Sharing"
# 3.4.1. Enable "Share this file"
# 3.4.2. Under "Permissions", allow full control. Apply
# 3.5. Click "Share" and use de drop down to add "Everyone" and change "Permission Level" to "Read/Write". Share, Done
# 3.6. Search for services and open menu
# 3.6.1. Search for below serices. Right click and select "Properties". "Startup type" = Automatic
# 10. Set up networking. If something like virbr0 does not get detected start virt-manager. Commands:
# $ sudo ip tuntap add dev tap0 mode tap
# $ sudo ip link set tap0 up promisc on
# $ sudo ip link set dev virbr0 up
# $ sudo ip link set dev tap0 master virbr0
# 11. Boot the system
# 11.1 $ ./OpenCore-Boot.sh
# 12. Choose the first option to start the MacOS installer: macOS Base Systen
# 12.1 Use Disk Utility to esase the correct drive.
# 13. Go back and select the option to reinstall macOS
# 13.1 After the initial installation, a reboot will happen. Do nothing and wait or select the second option 'MacOs install'.
# 13.2 This will finalize the installaton but it will probably reboot multiple times. The second option will now have changed to the name of your drive. Use this as the boot option
# 14. To add the installation to virt-manager:
# 14.1 $ sed "s/CHANGEME/$USER/g" macOS-libvirt-Catalina.xml > macOS.xml
# 14.2 Inside macOS.xml change the emulator from /usr/bin/qemu-system-x86_64 to /run/libvirt/nix-emulators/qemu-system-x86_64