-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
35 lines (27 loc) · 1.13 KB
/
Makefile
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
.POSIX:
.PHONY: default build update
default: build
/nix:
curl -L https://nixos.org/nix/install | sh
# TODO https://github.com/LnL7/nix-darwin/issues/149
sudo rm /etc/nix/nix.conf
/run/current-system/sw/bin/darwin-rebuild:
/nix/var/nix/profiles/default/bin/nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
yes | ./result/bin/darwin-installer
/opt/homebrew/bin/brew:
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o /tmp/brew-install.sh
NONINTERACTIVE=1 bash /tmp/brew-install.sh
~/.ssh/id_ed25519:
ssh-keygen -t ed25519 -f "$@"
~/.git: ~/.ssh/id_ed25519
cd ~ \
&& git init \
&& git config status.showUntrackedFiles no \
&& git remote add origin https://github.com/khuedoan/dotfiles \
&& git pull origin master \
&& git remote set-url origin [email protected]:khuedoan/dotfiles
build: /nix /run/current-system/sw/bin/darwin-rebuild /opt/homebrew/bin/brew ~/.git
/run/current-system/sw/bin/nix --experimental-features 'nix-command flakes' build ./\#darwinConfigurations.$(shell hostname -s).system
./result/sw/bin/darwin-rebuild switch --flake .
update:
nix flake update