-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 873 Bytes
/
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
36
default: help
DARWIN_REBUILD := ./result/sw/bin/darwin-rebuild
.PHONY: deploy-work
deploy-work: ## Deploy work configuration
./switch-environment.sh work
make deploy
.PHONY: deploy-personal
deploy-personal: ## Deploy personal configuration
./switch-environment.sh personal
make deploy
.PHONY: deploy
deploy: $(DARWIN_REBUILD) ## Bootstrap
$(DARWIN_REBUILD) switch \
--flake .#aarch64-darwin \
--option accept-flake-config true
.PHONY: fmt
fmt: ## Format code
nix fmt --accept-flake-config
.PHONY: lint
lint: ## Lint code
nix fmt --accept-flake-config -- --check .
nix run github:astro/deadnix -- --fail
nix flake check --all-systems --accept-flake-config
.PHONY: help
help: Makefile ## Print this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sort \
| awk 'BEGIN {FS = ":.*?## "}; \
{printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'