-
Notifications
You must be signed in to change notification settings - Fork 0
/
whatIdidToinstallOnmacFromstart2024
executable file
·48 lines (33 loc) · 1.66 KB
/
whatIdidToinstallOnmacFromstart2024
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# install git and xcode tools
xcode-select --install
# now, git should be installed. if you type git, and xcode tools aren't installed, it will prompt to install them with a gui.
# install git
# git
# (then install xcode tools)
# install rosetta2
sudo softwareupdate --install-rosetta
# then press A and enter to continue.
#SSH keys
ssh-keygen -t ed25519 #(then add .ssh/id_ed25519.pub key to github)
# set hostname of macbook air
sudo scutil --set HostName NIXY
sudo scutil --set ComputerName NIXY
sudo scutil --set LocalHostName NIXY
# install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# install nix with flakes enabled automatically
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
# source & start the nix-daemon on mac
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
# clone the git repo... could use nix command or git clone command
cd ~/ && git clone [email protected]:aspauldingcode/.dotfiles.git
cd ~/.dotfiles
# rename critial /etc/ files to append .before-nix-darwin
sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.before-nix-darwin
# install nix-darwin from the flake
#Step 2. Installing nix-darwin
#Instead of using darwin-installer, you can just run darwin-rebuild switch to install nix-darwin. As darwin-rebuild won't be installed in your PATH yet, you can use the following command:
nix run --extra-experimental-features "nix-command flakes" nix-darwin -- switch --flake ~/.dotfiles#NIXY
#nix run nix-darwin -- switch --flake ~/.dotfiles#NIXY
# Use nix-darwin.. and rebuild to apply flake changes
darwin-rebuild switch --flake ~/.dotfiles#NIXY