diff options
Diffstat (limited to 'nixops/Makefile')
-rw-r--r-- | nixops/Makefile | 51 |
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 @@ | |||
1 | setup: | ||
2 | ./scripts/setup | ||
3 | |||
4 | ssh-eldiron: | ||
5 | ./scripts/nixops_wrap ssh eldiron | ||
6 | |||
7 | info: | ||
8 | ./scripts/nixops_wrap list | ||
9 | ./scripts/nixops_wrap info | ||
10 | |||
11 | debug: | ||
12 | ./scripts/nixops_wrap deploy --build-only --show-trace | ||
13 | |||
14 | dry-run: | ||
15 | ./scripts/nixops_wrap deploy --dry-run | ||
16 | |||
17 | build: | ||
18 | ./scripts/nixops_wrap deploy --build-only | ||
19 | |||
20 | upload: | ||
21 | ./scripts/nixops_wrap deploy --copy-only | ||
22 | |||
23 | deploy: | ||
24 | ./scripts/nixops_wrap deploy | ||
25 | |||
26 | push: | ||
27 | ./scripts/push_deployment | ||
28 | ./scripts/push_environment | ||
29 | |||
30 | pull: | ||
31 | ./scripts/pull_environment | ||
32 | |||
33 | pull-deployment: | ||
34 | ./scripts/pull_deployment | ||
35 | |||
36 | profile = $(shell ./scripts/nixops_wrap info | grep "^Nix profile: " | sed -e "s/^Nix profile: //") | ||
37 | GEN ?= "+3" | ||
38 | |||
39 | list-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 | |||
43 | delete-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 | |||
47 | cleanup: 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 | ||