-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (46 loc) · 1.08 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
DOCKER_IMAGE_NAME=dotfiles
DOCKER_PLATFORM=linux/arm64
#
# Docker
#
.PHONY: docker-build-base
docker-build-base:
docker build -t $(DOCKER_IMAGE_NAME) \
--target base \
--platform $(DOCKER_PLATFORM) . \
--build-arg USERNAME="$$(whoami)"
.PHONY: docker-run-base
docker-run-base: docker-build-base
docker run --rm -it \
--platform $(DOCKER_PLATFORM) $(DOCKER_IMAGE_NAME) \
/bin/bash --login
.PHONY: docker-build-dev
docker-build-dev:
docker build -t $(DOCKER_IMAGE_NAME) \
--target dev \
--platform $(DOCKER_PLATFORM) . \
--build-arg USERNAME="$$(whoami)"
.PHONY: docker-dev
docker-dev: docker-build-dev
docker run --rm -it \
-v "$$(pwd):/home/$$(whoami)/.local/share/chezmoi" \
--platform $(DOCKER_PLATFORM) $(DOCKER_IMAGE_NAME) \
/bin/bash --login
#
# Chezmoi
#
.PHONY: init
init:
chezmoi init --apply --verbose
.PHONY: update
update:
chezmoi apply --verbose
.PHONY: watch
watch:
DOTFILES_DEBUG=1 watchexec -- chezmoi apply --verbose
.PHONY: reset
reset:
chezmoi state delete-bucket --bucket=scriptState
.PHONY: reset-config
reset-config:
chezmoi init --data=false