Files
mac_os/mac_os-config/bin/install_basics
Andreas Düren c94070723b Initial setup: mac_os installer with custom config
Contains both components needed for Mac setup:
- mac_os/: Installer scripts (from bkuhlmann/mac_os)
- mac_os-config/: Custom app configuration

Configured apps:
- Homebrew formulas: atuin, bash, ffmpeg, mas, mole, node, rename, ykman
- Homebrew casks: chromium, deepl, element, nextcloud, nova, proton suite, signal, transmit
- App Store: Affinity suite, Bitwarden, Final Cut Pro, Invoice Ninja, iWork, PastePal, xSearch

Usage: cd mac_os && ./bin/run

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:33:22 -06:00

40 lines
1.2 KiB
Bash
Executable File

#! /usr/bin/env bash
# Installs basic system settings.
read -p "What is this machine's label (Example: \"Alchemist\")? " mac_os_label
if [[ -z "$mac_os_label" ]]; then
printf "%s\n" "ERROR: Invalid MacOS label."
exit 1
fi
read -p "What is this machine's name (Example: \"alchemist\")? " mac_os_name
if [[ -z "$mac_os_name" ]]; then
printf "%s\n" "ERROR: Invalid MacOS name."
exit 1
fi
read -p "Delete all files in $HOME/Documents (y/n)? " documents
if [[ "$documents" == "y" ]]; then
rm -rf "$HOME/Documents/*"
printf "%s\n" "Documents deleted."
fi
read -p "Delete all files in $HOME/Downloads (y/n)? " downloads
if [[ "$downloads" == "y" ]]; then
rm -rf "$HOME/Downloads/*"
printf "%s\n" "Downloads deleted."
fi
read -p "Change /usr/local ownership to $USER:staff (y/n)? " ownership
if [[ "$ownership" == "y" ]]; then
sudo chown -R "$USER":staff /usr/local
printf "%s\n" "Ownership changed."
fi
printf "Setting system label and name...\n"
sudo scutil --set ComputerName "$mac_os_label"
sudo scutil --set HostName "$mac_os_name"
sudo scutil --set LocalHostName "$mac_os_name"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string $mac_os_name