aboutsummaryrefslogtreecommitdiff
path: root/nixops/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'nixops/Makefile')
-rw-r--r--nixops/Makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixops/Makefile b/nixops/Makefile
new file mode 100644
index 0000000..1d76a9c
--- /dev/null
+++ b/nixops/Makefile
@@ -0,0 +1,51 @@
1setup:
2 ./scripts/setup
3
4ssh-eldiron:
5 ./scripts/nixops_wrap ssh eldiron
6
7info:
8 ./scripts/nixops_wrap list
9 ./scripts/nixops_wrap info
10
11debug:
12 ./scripts/nixops_wrap deploy --build-only --show-trace
13
14dry-run:
15 ./scripts/nixops_wrap deploy --dry-run
16
17build:
18 ./scripts/nixops_wrap deploy --build-only
19
20upload:
21 ./scripts/nixops_wrap deploy --copy-only
22
23deploy:
24 ./scripts/nixops_wrap deploy
25
26push:
27 ./scripts/push_deployment
28 ./scripts/push_environment
29
30pull:
31 ./scripts/pull_environment
32
33pull-deployment:
34 ./scripts/pull_deployment
35
36profile = $(shell ./scripts/nixops_wrap info | grep "^Nix profile: " | sed -e "s/^Nix profile: //")
37GEN ?= "+3"
38
39list-generations:
40 nix-env -p $(profile) --list-generations
41 ./scripts/nixops_wrap ssh eldiron -- nix-env -p /nix/var/nix/profiles/system --list-generations
42
43delete-generations:
44 nix-env -p $(profile) --delete-generations $(GEN)
45 ./scripts/nixops_wrap ssh eldiron -- nix-env -p /nix/var/nix/profiles/system --delete-generations $(GEN)
46
47cleanup: delete-generations
48 nix-store --gc
49 ./scripts/nixops_wrap ssh eldiron -- nix-store --gc
50
51.PHONY: setup ssh-eldiron info debug dry-run build upload deploy push pull pull-deployment list-generations delete-generations cleanup