diff --git a/templates/base.pkr.hcl b/templates/base.pkr.hcl index 4909e26..ea8df08 100644 --- a/templates/base.pkr.hcl +++ b/templates/base.pkr.hcl @@ -1,7 +1,7 @@ packer { required_plugins { tart = { - version = ">= 0.3.1" + version = ">= 0.5.1" source = "github.com/cirruslabs/tart" } } diff --git a/templates/disable-sip.pkr.hcl b/templates/disable-sip.pkr.hcl new file mode 100644 index 0000000..8a01837 --- /dev/null +++ b/templates/disable-sip.pkr.hcl @@ -0,0 +1,41 @@ +packer { + required_plugins { + tart = { + version = ">= 0.5.2" + source = "github.com/cirruslabs/tart" + } + } +} + +variable "vm_name" { + type = string +} + +source "tart-cli" "tart" { + vm_name = "${var.vm_name}" + recovery = true + cpu_count = 4 + memory_gb = 8 + disk_size_gb = 50 + communicator = "none" + boot_command = [ + # Skip over "Macintosh" and select "Options" + # to boot into macOS Recovery + "", + # Select default language + "", + # Open Terminal + "", + "", + # Disable SIP + "csrutil disable", + "y", + "admin", + # Shutdown + "halt" + ] +} + +build { + sources = ["source.tart-cli.tart"] +} diff --git a/templates/vanilla-monterey.pkr.hcl b/templates/vanilla-monterey.pkr.hcl new file mode 100644 index 0000000..809ccaa --- /dev/null +++ b/templates/vanilla-monterey.pkr.hcl @@ -0,0 +1,80 @@ +packer { + required_plugins { + tart = { + version = ">= 0.5.1" + source = "github.com/cirruslabs/tart" + } + } +} + +source "tart-cli" "tart" { + from_ipsw = "latest" + vm_name = "monterey-vanilla" + cpu_count = 4 + memory_gb = 8 + disk_size_gb = 40 + ssh_password = "admin" + ssh_username = "admin" + ssh_timeout = "120s" + boot_command = [ + # hello, hola, bonjour, etc. + "", + # Language + "", + # Select Your Country and Region + "united states", + # Written and Spoken Languages + "", + # Accessibility + "", + # Data & Privacy + "", + # Migration Assistant + "", + # Sign In with Your Apple ID + "", + # Are you sure you want to skip signing in with an Apple ID? + "", + # Terms and Conditions + "", + # I have read and agree to the macOS Software License Agreement + "", + # Create a Computer Account + "adminadminadmin", + # Enable Location Services + "", + # Are you sure you don't want to use Location Services? + "", + # Select Your Time Zone + "UTC", + # Analytics + "", + # Screen Time + "", + # Siri + "", + # Choose Your Look + "", + # Enable Voice Over + "v", + # Now that the installation is done, open "System Preferences" + "System Preferences", + # Navigate to "Sharing" + "sharing", + # Enable Remote Login + "", + # Disable Voice Over + "", + ] +} + +build { + sources = ["source.tart-cli.tart"] + + provisioner "shell" { + inline = [ + // Enable passwordless sudo + "echo admin | sudo -S sh -c \"echo 'admin ALL=(ALL) NOPASSWD: ALL' | EDITOR=tee visudo /etc/sudoers.d/admin-nopasswd\"", + ] + } +} diff --git a/templates/vanilla-ventura.pkr.hcl b/templates/vanilla-ventura.pkr.hcl new file mode 100644 index 0000000..e21d18f --- /dev/null +++ b/templates/vanilla-ventura.pkr.hcl @@ -0,0 +1,88 @@ +packer { + required_plugins { + tart = { + version = ">= 0.5.1" + source = "github.com/cirruslabs/tart" + } + } +} + +source "tart-cli" "tart" { + # You can find macOS IPSW URLs on various websites like https://ipsw.me/ + # and https://www.theiphonewiki.com/wiki/Beta_Firmware/Mac/13.x + from_ipsw = "https://updates.cdn-apple.com/2022SummerSeed/fullrestores/012-70113/6F1F08B7-9A1B-48A9-93DB-55EE21121C87/UniversalMac_13.0_22A5352e_Restore.ipsw" + vm_name = "ventura-vanilla" + cpu_count = 4 + memory_gb = 8 + disk_size_gb = 40 + ssh_password = "admin" + ssh_username = "admin" + ssh_timeout = "120s" + boot_command = [ + # hello, hola, bonjour, etc. + "", + # Language + "", + # Select Your Country and Region + "united states", + # Written and Spoken Languages + "", + # Accessibility + "", + # Data & Privacy + "", + # Migration Assistant + "", + # Sign In with Your Apple ID + "", + # Are you sure you want to skip signing in with an Apple ID? + "", + # Terms and Conditions + "", + # I have read and agree to the macOS Software License Agreement + "", + # Create a Computer Account + "adminadminadmin", + # Enable Location Services + "", + # Are you sure you don't want to use Location Services? + "", + # Select Your Time Zone + "UTC", + # Analytics + "", + # Screen Time + "", + # Siri + "", + # Choose Your Look + "", + # Enable Voice Over + "v", + # Now that the installation is done, open "System Preferences" + "System Preferences", + # Navigate to "Sharing" + "sharing", + # Navigate to "Remote Login" and enable it + "", + # Navigate to "Remote Login" once more and open its settings + "", + # Enable "Full Disk Access" + "", + # Click "Done" + "", + # Disable Voice Over + "", + ] +} + +build { + sources = ["source.tart-cli.tart"] + + provisioner "shell" { + inline = [ + // Enable passwordless sudo + "echo admin | sudo -S sh -c \"echo 'admin ALL=(ALL) NOPASSWD: ALL' | EDITOR=tee visudo /etc/sudoers.d/admin-nopasswd\"", + ] + } +} diff --git a/templates/xcode.pkr.hcl b/templates/xcode.pkr.hcl index 23657cd..30cb4ef 100644 --- a/templates/xcode.pkr.hcl +++ b/templates/xcode.pkr.hcl @@ -1,7 +1,7 @@ packer { required_plugins { tart = { - version = ">= 0.3.1" + version = ">= 0.5.1" source = "github.com/cirruslabs/tart" } }