refactor(setup): Remove user specific stuff & ask for hostname
So not everyone is running around with "MacBook Tobias" lol
This commit is contained in:
parent
00d30326b4
commit
f5cc33c213
2 changed files with 10 additions and 6 deletions
|
@ -42,6 +42,16 @@ mkdir -p $HOME/git/private
|
|||
# Activate asimov to automatically exclude node_modules from TM backup
|
||||
sudo brew services start asimov
|
||||
|
||||
read -p "Enter a name for your MacBook, typically 'MacBook YOURNAME' [default: MacBook cb.]: " computername
|
||||
computername=${computername:-MacBook cb.}
|
||||
echo "Setting hostname to $computername"
|
||||
|
||||
# Set computer name (as done via System Preferences → Sharing)
|
||||
sudo scutil --set ComputerName "$computername"
|
||||
sudo scutil --set HostName "$computername"
|
||||
sudo scutil --set LocalHostName "$computername"
|
||||
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$computername"
|
||||
|
||||
# Set macOS preferences - we will run this last because this will reload the shell
|
||||
source ${DOTFILES}/macos/.macos
|
||||
|
||||
|
|
|
@ -17,12 +17,6 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
|||
# General UI/UX #
|
||||
###############################################################################
|
||||
|
||||
# Set computer name (as done via System Preferences → Sharing)
|
||||
sudo scutil --set ComputerName "MacBook Tobias"
|
||||
sudo scutil --set HostName "MacBook Tobias"
|
||||
sudo scutil --set LocalHostName "MacBook Tobias"
|
||||
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "MacBook Tobias"
|
||||
|
||||
# Disable the sound effects on boot
|
||||
sudo nvram SystemAudioVolume=" "
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue