From 30894eee2aa7de19050ecc9a183ab0ed06a8b6af Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 2 Jun 2023 19:43:32 +0200 Subject: [PATCH 1/9] Update Brewfile --- macx-resources/Brewfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macx-resources/Brewfile b/macx-resources/Brewfile index b813c08..e49bc4e 100644 --- a/macx-resources/Brewfile +++ b/macx-resources/Brewfile @@ -52,11 +52,13 @@ brew "smartmontools" brew "wireguard-tools" ## development +brew "go" brew "gcc" brew "glib" brew "make" brew "cmake" brew "ninja" +brew "kicad" brew "sqlite" brew "dotnet" brew "python" @@ -93,7 +95,6 @@ cask "telegram" ## documents and synchronization cask "obsidian" cask "syncthing" -cask "google-drive" #cask "mactex-no-gui" # disabled for disk space reasons ## data transfer and encryption @@ -156,7 +157,6 @@ cask "telegram-desktop" brew "mas" ## Development -mas "Xcode", id: 497799835 mas "Apple Configurator", id: 1037126344 ## iLife From 8c847110d956ca879dbdfbf915e3cc7ee679df22 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 3 Jun 2023 19:02:59 +0200 Subject: [PATCH 2/9] Update macx --- macx-resources/zshrc | 4 ++-- macx.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/macx-resources/zshrc b/macx-resources/zshrc index 19f2d44..f21cd75 100644 --- a/macx-resources/zshrc +++ b/macx-resources/zshrc @@ -13,7 +13,7 @@ if type brew &>/dev/null; then fi checkin () { - curl -H 'Authorization: Bearer replace_me_with_secret' -d '{"reason": "ping", "status": {"checkedIn": true, "train": {"type": "'$1'", "no": "'$2'"}, "toStation": {"name": "'$3'"}}}' https://zotan.pw/travelynx.php + curl -H "Authorization: Bearer $(cat ~/.os-bootstrap/secrets/travelynx_token)" -d '{"reason": "ping", "status": {"checkedIn": true, "train": {"type": "'$1'", "no": "'$2'"}, "toStation": {"name": "'$3'"}}}' https://zotan.pw/travelynx.php } # editor aliases @@ -40,4 +40,4 @@ alias 'wg-reconnect'='sudo wg-quick down uplink && sudo wg-quick up uplink' alias dotnet-autocompile='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r linux-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r win-x64' alias dotnet-autocompile-notrim='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r linux-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r win-x64' alias dotnet-autocompile-maconly='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64' -alias dotnet-autocompile-maconly-notrim='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64' \ No newline at end of file +alias dotnet-autocompile-maconly-notrim='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64' diff --git a/macx.sh b/macx.sh index 45d477d..455c13c 100644 --- a/macx.sh +++ b/macx.sh @@ -16,13 +16,13 @@ export HOMEBREW_CASK_OPTS="--no-quarantine" set +e echo -echo "--- Downloading Brewfile ---" -mkdir -p ~/Projects -git clone https://git.ztn.sh/zotan/os-install-scripts ~/Projects/os-install-scripts +echo "--- Cloning os-bootstrap-core ---" +mkdir ~/.os-bootstrap +git clone https://git.ztn.sh/zotan/os-bootstrap-core ~/.os-bootstrap/core echo echo "--- Linking to system Brewfile ---" -ln -s ~/Projects/os-install-scripts/macx-resources/Brewfile ~/.Brewfile +ln -s ~/.os-bootstrap/core/macx-resources/Brewfile ~/.Brewfile echo echo "--- Running brew bundle ---" From de3b17914a81121cfacf1df9600a2d8f9487d5aa Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 5 Jun 2023 03:26:27 +0200 Subject: [PATCH 3/9] Update macx --- macx-resources/Brewfile | 2 +- macx.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/macx-resources/Brewfile b/macx-resources/Brewfile index e49bc4e..8bef662 100644 --- a/macx-resources/Brewfile +++ b/macx-resources/Brewfile @@ -58,7 +58,6 @@ brew "glib" brew "make" brew "cmake" brew "ninja" -brew "kicad" brew "sqlite" brew "dotnet" brew "python" @@ -105,6 +104,7 @@ cask "balenaetcher" cask "monero-wallet" ## development +cask "kicad" cask "hex-fiend" cask "jetbrains-toolbox" diff --git a/macx.sh b/macx.sh index 455c13c..53754d6 100644 --- a/macx.sh +++ b/macx.sh @@ -3,6 +3,11 @@ clear echo "macx.sh by ~zotan, bootstrapping system..." echo +echo "--- Opening sudo session ---" +# From https://gist.github.com/cowboy/3118588 +sudo -v +while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & +echo echo "--- Installing Rosetta 2 ---" /usr/sbin/softwareupdate --install-rosetta --agree-to-license From e36d4b88d29d87aa2923c8209d52bcb1072a9421 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 5 Jun 2023 04:03:29 +0200 Subject: [PATCH 4/9] Update Brewfile --- macx-resources/Brewfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macx-resources/Brewfile b/macx-resources/Brewfile index 8bef662..a6f5d6b 100644 --- a/macx-resources/Brewfile +++ b/macx-resources/Brewfile @@ -98,7 +98,7 @@ cask "syncthing" ## data transfer and encryption cask "transmit" -cask "gpg-suite" +cask "gpg-suite-no-mail" cask "tor-browser" cask "balenaetcher" cask "monero-wallet" From c282c013896ef747919ce991dd4eb0af362308e2 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 5 Jun 2023 04:19:18 +0200 Subject: [PATCH 5/9] Update macx --- macx.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macx.sh b/macx.sh index 53754d6..d72f956 100644 --- a/macx.sh +++ b/macx.sh @@ -7,6 +7,7 @@ echo "--- Opening sudo session ---" # From https://gist.github.com/cowboy/3118588 sudo -v while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & +caffeinate -disu -w $$ echo echo "--- Installing Rosetta 2 ---" /usr/sbin/softwareupdate --install-rosetta --agree-to-license @@ -14,7 +15,7 @@ echo "--- Installing Rosetta 2 ---" echo echo "--- Installing homebrew ---" set -e -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)" export HOMEBREW_CASK_OPTS="--no-quarantine" From 566e4f14f12ad38c78a38178dae1c84aaf310c02 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 5 Jun 2023 04:24:45 +0200 Subject: [PATCH 6/9] fix ampersand --- macx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macx.sh b/macx.sh index d72f956..f6dce09 100644 --- a/macx.sh +++ b/macx.sh @@ -7,7 +7,7 @@ echo "--- Opening sudo session ---" # From https://gist.github.com/cowboy/3118588 sudo -v while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & -caffeinate -disu -w $$ +caffeinate -disu -w $$ & echo echo "--- Installing Rosetta 2 ---" /usr/sbin/softwareupdate --install-rosetta --agree-to-license From 225c4863f9abd6d8497bc7036f9d5b1b368cb2f5 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 6 Jul 2023 04:24:20 +0200 Subject: [PATCH 7/9] Update Brewfile --- macx-resources/Brewfile | 1 + 1 file changed, 1 insertion(+) diff --git a/macx-resources/Brewfile b/macx-resources/Brewfile index a6f5d6b..0600fe0 100644 --- a/macx-resources/Brewfile +++ b/macx-resources/Brewfile @@ -165,6 +165,7 @@ mas "Numbers", id: 409203825 mas "Pages", id: 409201541 ## Other +mas "Mona for Mastodon", id: 1659154653 mas "Amphetamine", id: 937984704 mas "Navigator", id: 1590354537 mas "Reeder", id: 1529448980 From 27ad859ca54fdd90ef3d2383fbfdd927c27b6cca Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 16 Nov 2023 21:12:39 +0100 Subject: [PATCH 8/9] Update arch repo url --- archx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archx.sh b/archx.sh index 1ba9eb6..9ca005e 100644 --- a/archx.sh +++ b/archx.sh @@ -187,7 +187,7 @@ pacman_setup(){ echo "Waiting for pacman database to become available..." sleep 5 done - sed '7iServer = https://arch.zotan.services/$repo/os/$arch\n' /etc/pacman.d/mirrorlist > /etc/pacman.d/mirrors + sed '7iServer = https://repo.ztn.sh/archlinux/$repo/os/$arch\n' /etc/pacman.d/mirrorlist > /etc/pacman.d/mirrors mv /etc/pacman.d/mirrors /etc/pacman.d/mirrorlist pacman -Sy --needed --noconfirm archlinux-keyring pacman -S --needed --noconfirm arch-install-scripts From e0535faaedc8a642a6772a68c57243bbdd305a6e Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 11 Dec 2023 18:44:25 +0100 Subject: [PATCH 9/9] Fix partition type ids --- archx.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archx.sh b/archx.sh index 9ca005e..299501c 100644 --- a/archx.sh +++ b/archx.sh @@ -207,11 +207,11 @@ partition_disk(){ if [[ $efi -eq 1 ]]; then sgdisk $disk -n=1:0:+1024M -t=1:ef00 sgdisk $disk -n=2:0:-$swapsize - sgdisk $disk -n=3:0:0 -t=2:8200 + sgdisk $disk -n=3:0:0 -t=3:8200 else sgdisk $disk -n=1:0:+1M -t=1:ef02 sgdisk $disk -n=2:0:-$swapsize - sgdisk $disk -n=3:0:0 -t=2:8200 + sgdisk $disk -n=3:0:0 -t=3:8200 fi # Special naming for eMMC and NVME devices