Compare commits

..

No commits in common. "master" and "catalina" have entirely different histories.

26 changed files with 97 additions and 145 deletions

23
README.md Normal file → Executable file
View File

@ -1,28 +1,15 @@
# osx # osximage
New deal for Catalina/Big Sur: Imaging is dead. Install a fresh install New deal for Catalina: Imaging is dead. Install a fresh install
manually, then do the following. manually, then do the following.
# Manual Prerequisite Steps # Manual Steps
Open System Preferences. Open System Preferences.
* Sharing > Set Hostname * Sharing > Set Hostname
* Security and Privacy > FileVault > Enable
Open a terminal and run the following: Open a terminal and run the following:
* `chsh -s /bin/bash` and enter password * `sudo xcodebuild -license accept`
* `sudo xcodebuild -license accept` and click ok/install on developer tools * `bash <(curl -s https://github.com/sneak/osximage/FIXME)`
installer popup window
* `sudo xcode-select --install`
# The Install
```bash
bash <(curl -s https://git.eeqj.de/sneak/osx/raw/branch/master/install.sh)
```
# Uninstall (not 100%, only for dev)
```bash
rm -rfv ~/.profile ~/.bashrc ~/Library/Homebrew ~/Library/bashrc.d ~/Library/profile.d ~/Library/user-setup $TMPDIR/osx
```

View File

@ -1 +0,0 @@
export BASH_SILENCE_DEPRECATION_WARNING=1

View File

@ -1,3 +0,0 @@
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then
. $HOME/.nix-profile/etc/profile.d/nix.sh;
fi

View File

@ -1,4 +0,0 @@
if [[ -d $HOME/Library/Homebrew ]]; then
export PATH="$PATH:$HOME/Library/Homebrew/bin"
fi

View File

@ -0,0 +1 @@
export HOMEBREW_CASK_OPTS="--appdir=$HOME/Applications"

View File

@ -1,10 +0,0 @@
export DO_NOT_TRACK=1
# the rest
export HOMEBREW_NO_ANALYTICS=1
export GATSBY_TELEMETRY_DISABLED=1
export STNOUPGRADE=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export SAM_CLI_TELEMETRY=0
export AZURE_CORE_COLLECT_TELEMETRY=0

View File

@ -0,0 +1 @@
export HOMEBREW_NO_ANALYTICS=1

View File

@ -0,0 +1,2 @@
export PATH="$HOME/Library/Homebrew/sbin:$PATH"
export PATH="$HOME/Library/Homebrew/bin:$PATH"

View File

@ -0,0 +1 @@
export LDFLAGS="$LDFLAGS -I$(brew --prefix)/opt/openssl/include -L$(brew --prefix)/opt/openssl/lib"

View File

@ -0,0 +1,4 @@
if [[ -e "$HOME/Library/Homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk" ]]; then
source "$HOME/Library/Homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc"
source "$HOME/Library/Homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc"
fi

View File

@ -13,7 +13,7 @@ if [[ ! -e $HOME/.gpg-agent-info ]]; then
gpg-agent \ gpg-agent \
--enable-ssh-support \ --enable-ssh-support \
--daemon \ --daemon \
--pinentry-program $HOME/.nix-profile/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac \ --pinentry-program $(brew --prefix)/bin/pinentry-mac \
2> /dev/null > $HOME/.gpg-agent-info 2> /dev/null > $HOME/.gpg-agent-info
fi fi
fi fi

View File

@ -1,5 +1,3 @@
if which brew 2>&1 >/dev/null ; then if [ -f $(brew --prefix)/etc/bash_completion ]; then
if [ -f $(brew --prefix)/etc/bash_completion ]; then source $(brew --prefix)/etc/bash_completion
source $(brew --prefix)/etc/bash_completion
fi
fi fi

View File

@ -1,15 +1,8 @@
#!/bin/bash #!/bin/bash
############################################# install homebrew under homedir ############################################# install homebrew under homedir
# reminder: homebrew is *spyware*. using it in the default configuration is
# *unsafe*. other scripts elsewhere set HOMEBREW_NO_ANALYTICS to disable
# its spying; do not use this file in isolation.
if [[ ! -d ~/Library/Homebrew ]]; then if [[ ! -d ~/Library/Homebrew ]]; then
mkdir -p ~/Library/Homebrew mkdir -p ~/Library/Homebrew
cd ~/Library/Homebrew cd ~/Library/Homebrew
curl -fsSL https://github.com/Homebrew/brew/tarball/master | \ curl -fsSL https://github.com/Homebrew/brew/tarball/master | \
tar --strip-components 1 -xvf - tar --strip-components 1 -xvf -
fi fi
~/Library/Homebrew/bin/brew analytics off

View File

@ -1,5 +0,0 @@
#!/bin/sh
xcode-select --license accept
xcode-select --install
xcode-select --license accept

View File

@ -1,6 +1,4 @@
# adds homebrew python packages dir to python paths # adds homebrew python packages dir to python paths
if [[ -d "$HOME/Library/Python/2.7/lib/python/site-packages/" ]]; then
echo "import site; site.addsitedir(\"$HOME/Library/Homebrew/lib/python2.7/site-packages\")" >> \ echo "import site; site.addsitedir(\"$HOME/Library/Homebrew/lib/python2.7/site-packages\")" >> \
$HOME/Library/Python/2.7/lib/python/site-packages/homebrew.pth $HOME/Library/Python/2.7/lib/python/site-packages/homebrew.pth
fi

View File

@ -1,4 +0,0 @@
#!/bin/bash
# a small vote for the status quo, or perhaps just a vote against the cost of change vs the zero benefit
git config --global init.defaultBranch master

View File

@ -1,12 +1,7 @@
#!/bin/bash #!/bin/bash
# set up paths and whatnot and ensure homebrew's spyware is disabled # set up paths and whatnot
source $HOME/.profile source $HOME/.profile
export HOMEBREW_NO_ANALYTICS=1
# this shouldn't be needed but it is
export PATH="$PATH:$HOME/Library/Homebrew/bin"
# per default settings apps are installed in homedir # per default settings apps are installed in homedir
if [[ ! -d ~/Applications ]]; then if [[ ! -d ~/Applications ]]; then
@ -14,36 +9,49 @@ if [[ ! -d ~/Applications ]]; then
fi fi
# install caskroom # install caskroom
brew tap homebrew/cask brew tap caskroom/cask
# the following is required for fetching some of the fonts
brew install --build-from-source svn
# no google-drive-file-stream because it requires admin privs and installs to /Applications systemwide # no google-drive-file-stream because it requires admin privs and installs to /Applications systemwide
CASKS=" CASKS="
alacritty 1password
1password-cli
ableton-live-suite
anki
atom atom
bitwarden dashlane
deluge deluge
disk-inventory-x disk-inventory-x
eloston-chromium expandrive
homebrew/cask/handbrake google-chrome
google-cloud-sdk
handbrake
iterm2 iterm2
signal keepassx
homebrew/cask/syncthing keybase
lastpass
little-snitch
minikube
openscad
sketch
slack
spotify
sublime-text
syncthing-app
tor-browser tor-browser
vcv-rack
vlc vlc
wasabi-wallet wasabi-wallet
xscreensaver xscreensaver
" "
for CASK in $CASKS ; do for CASK in $CASKS ; do
brew install --appdir="$HOME/Applications" $CASK brew cask install $CASK
done done
brew tap homebrew/cask-fonts brew tap caskroom/fonts
FONTS=" FONTS="
font-anonymice-powerline
font-consolas-for-powerline font-consolas-for-powerline
font-dejavu-sans-mono-for-powerline font-dejavu-sans-mono-for-powerline
font-droid-sans-mono-for-powerline font-droid-sans-mono-for-powerline
@ -62,5 +70,5 @@ FONTS="
" "
for FONT in $FONTS ; do for FONT in $FONTS ; do
brew install $FONT brew cask install $FONT
done done

View File

@ -1,32 +1,19 @@
#!/bin/bash #!/bin/bash
# reminder: homebrew is *spyware*. if you don't do this, it won't # set up paths and whatnot
# set HOMEBREW_NO_ANALYTICS and it will silently spy on you when you use it. source $HOME/.profile
# this should happen in the .profile but let's do it again here to be certain:
source $HOME/.bashrc
export HOMEBREW_NO_ANALYTICS=1
# this shouldn't be needed but it is
export PATH="$PATH:$HOME/Library/Homebrew/bin"
# Homebrew's package database is on GitHub. The hashes to verify the
# authenticity of the source archive downloads are in the package database.
# Microsoft, a large US military contractor with long ties to illegal NSA spying
# programs, bought GitHub and can exercise control over them.
# What this means is that a large US military contractor has control over the
# precise software that gets installed on your computer when you
# type "brew install x". Cool, huh?
HOMEBREW_PKGS=" HOMEBREW_PKGS="
asciinema asciinema
autoconf autoconf
automake automake
bash-completion
bash-git-prompt
bonnie++ bonnie++
bwm-ng bwm-ng
byobu byobu
cksfv
cmake cmake
corelocationcli
coreutils coreutils
curl curl
daemontools daemontools
@ -43,6 +30,9 @@ HOMEBREW_PKGS="
gnupg gnupg
gnupg2 gnupg2
go go
gpg-agent
graphviz
heroku
homebrew/dupes/rsync homebrew/dupes/rsync
httpie httpie
httrack httrack
@ -55,21 +45,25 @@ HOMEBREW_PKGS="
mutt mutt
neovim neovim
nmap nmap
node
offlineimap offlineimap
p7zip p7zip
par2 par2
pbzip2 pbzip2
pgpdump pgpdump
pinentry-mac pinentry-mac
postgres
protobuf protobuf
pv pv
pwgen pwgen
python3 python3
rename rust
socat socat
sox sox
speedtest_cli speedtest_cli
syncthing
tcptraceroute tcptraceroute
terraform
tor tor
torsocks torsocks
trash trash
@ -82,5 +76,5 @@ HOMEBREW_PKGS="
" "
for PKG in $HOMEBREW_PKGS ; do for PKG in $HOMEBREW_PKGS ; do
brew install --build-from-source $PKG brew install $PKG
done done

View File

@ -6,11 +6,6 @@ PYTHON_PKGS="
virtualenv virtualenv
" "
# first, upgrade pip:
/usr/bin/pip3 install --upgrade --user pip
for PKG in $PYTHON_PKGS ; do for PKG in $PYTHON_PKGS ; do
/usr/bin/pip3 install --user $PKG /usr/local/bin/pip install --user $PKG
done done

View File

@ -0,0 +1,23 @@
#!/bin/bash
# set up paths and whatnot
source $HOME/.profile
NPM_PKGS="
coffee-script
yarn
"
for PKG in $NPM_PKGS ; do
# -g is okay because "global" prefix is where homebrew
# installed npm, i.e. in ~/Library/Homebrew, not actually systemwide
npm install -g $PKG
done
YARN_PKGS="
now
"
for PKG in $YARN_PKGS ; do
yarn global add $PKG
done

View File

@ -1,13 +0,0 @@
#!/bin/bash
# set up paths and whatnot
source $HOME/.profile
YARN_PKGS="
now
prettier
"
for PKG in $YARN_PKGS ; do
yarn global add $PKG
done

View File

@ -0,0 +1,5 @@
#!/bin/bash
# setup google drive as synceddir in ~/.paths
if [[ ! -e ~/.paths/synceddir ]]; then
ln -s ~/Google\ Drive\ File\ Stream/My\ Drive ~/.paths/synceddir
fi

View File

@ -1,5 +0,0 @@
#!/bin/bash
if command -v gcloud >/dev/null 2>&1 >/dev/null ; then
gcloud config set disable_usage_reporting true >/dev/null 2>&1
fi

View File

@ -2,39 +2,26 @@
function run_install { function run_install {
mkdir -p $HOME/Library/Caches/Homebrew sudo pmset -g
rm -rf $HOME/Library/Caches/Homebrew/* sudo pmset -a disablesleep 1
REPO="https://git.eeqj.de/sneak/osx.git" REPO="https://github.com/sneak/osximage.git"
DEST="$TMPDIR/osx" DEST="$TMPDIR/osximage"
if [[ ! -d "$DEST" ]]; then if [[ ! -d "$DEST" ]]; then
git clone "$REPO" "$DEST" git clone "$REPO" "$DEST"
else
cd "$DEST" && git pull && cd -
fi fi
rsync -avP "$DEST/custompkg/root/etc/skel/" "$HOME/" rsync -avP "$DEST/custompkg/root/etc/skel/" "$HOME/"
mkdir -p $HOME/Library/bashrc.d
mkdir -p $HOME/Library/profile.d
touch $HOME/Library/bashrc.d/000keep.sh
touch $HOME/Library/profile.d/000keep.sh
# FIXME move this into the modular setup scripts
mkdir -p "$HOME/Library/Desktop Pictures"
rsync -avP $TMPDIR/osx/custompkg/root/Library/Desktop?Pictures/ $HOME/Library/Desktop?Pictures/
defaults write \
~/Library/Preferences/com.apple.systempreferences DSKDesktopPrefPane \
'<dict><key>UserFolderPaths</key><array><string>/Users/user/Library/Desktop Pictures</string></array></dict>'
# run modular setup scripts # run modular setup scripts
for FN in "$HOME/Library/user-setup/"*.sh ; do for FN in $HOME/Library/user-setup/*.sh ; do
echo "new-user-setup: starting $(basename "$FN")..." echo "new-user-setup: starting $(basename $FN)..."
# we used to run these in a subshell but not we don't because we want the environment to persist between bash "$FN" 2>&1 | tee -a $HOME/Library/Logs/user-setup.log
source "$FN"
rm "$FN" rm "$FN"
echo "new-user-setup: removed $(basename $FN)..." echo "new-user-setup: removed $(basename $FN)..."
done done
sudo pmset -a disablesleep 0
} }
run_install run_install