Provisioning for my Macbook's based on Nix.
Generally all secrets are encrypted with agenix, so make sure to copy
the SSH keys from the secrets
stick with these commands:
mkdir -p $HOME/.ssh
cp /Volumes/secrets/ssh/id_* $HOME/.ssh/
chmod u=rw,g=,o= $HOME/.ssh/id_*
Generally we disable SIP, just boot into the recovery system and open a terminal
to execute csrutil disable
, after rebooting into the regular system you can
check with csrutil status
if it's still disabled.
Generally it's a good idea to install all apps from the store which have been bought, especially Xcode, otherwise it fails to build macOS applications.
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sh <(curl -L https://nixos.org/nix/install)
echo "run\tprivate/var/run" | sudo tee -a /etc/synthetic.conf
reboot
nix \
--extra-experimental-features "nix-command flakes" \
build \
github:tboerger/workstation\#osiris \
--no-write-lock-file
./result/sw/bin/darwin-rebuild switch \
--flake github:tboerger/workstation\#osiris
If the repository had been cloned you could just execute make switch
,
otherwise there is still this long option to update the deployment:
darwin-rebuild switch \
--flake github:tboerger/workstation\#osiris
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sh <(curl -L https://nixos.org/nix/install)
echo "run\tprivate/var/run" | sudo tee -a /etc/synthetic.conf
reboot
nix \
--extra-experimental-features "nix-command flakes" \
build \
github:tboerger/workstation\#hathor \
--no-write-lock-file
./result/sw/bin/darwin-rebuild switch \
--flake github:tboerger/workstation\#hathor
If the repository had been cloned you could just execute make switch
,
otherwise there is still this long option to update the deployment:
darwin-rebuild switch \
--flake github:tboerger/workstation\#hathor
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sh <(curl -L https://nixos.org/nix/install)
echo "run\tprivate/var/run" | sudo tee -a /etc/synthetic.conf
reboot
nix \
--extra-experimental-features "nix-command flakes" \
build \
github:tboerger/workstation\#anubis \
--no-write-lock-file
./result/sw/bin/darwin-rebuild switch \
--flake github:tboerger/workstation\#anubis
If the repository had been cloned you could just execute make switch
,
otherwise there is still this long option to update the deployment:
darwin-rebuild switch \
--flake github:tboerger/workstation\#anubis
If you find a security issue please contact [email protected] first.
Fork -> Patch -> Push -> Pull Request
Apache-2.0
Copyright (c) 2021 Thomas Boerger <[email protected]>