summaryrefslogtreecommitdiff
path: root/nixops/Makefile
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-12-13 21:25:24 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-24 01:40:13 +0200
commit252dd7d899b7a0deea1537cc5d2d48b825afffb0 (patch)
treef51c3c9cd7429b0b9553a840f26bee489be045bc /nixops/Makefile
downloadNUR-nur_root.tar.gz
NUR-nur_root.tar.zst
NUR-nur_root.zip
Initial commit published for NURnur_root
Diffstat (limited to 'nixops/Makefile')
-rw-r--r--nixops/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/nixops/Makefile b/nixops/Makefile
new file mode 100644
index 00000000..cce57ff4
--- /dev/null
+++ b/nixops/Makefile
@@ -0,0 +1,54 @@
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
26reboot:
27 ./scripts/nixops_wrap reboot --include=eldiron
28
29push:
30 ./scripts/push_deployment
31 ./scripts/push_environment
32
33pull:
34 ./scripts/pull_environment
35
36pull-deployment:
37 ./scripts/pull_deployment
38
39profile = $(shell ./scripts/nixops_wrap info | grep "^Nix profile: " | sed -e "s/^Nix profile: //")
40GEN ?= "+3"
41
42list-generations:
43 nix-env -p $(profile) --list-generations
44 ./scripts/nixops_wrap ssh eldiron -- nix-env -p /nix/var/nix/profiles/system --list-generations
45
46delete-generations:
47 nix-env -p $(profile) --delete-generations $(GEN)
48 ./scripts/nixops_wrap ssh eldiron -- nix-env -p /nix/var/nix/profiles/system --delete-generations $(GEN)
49
50cleanup: delete-generations
51 nix-store --gc
52 ./scripts/nixops_wrap ssh eldiron -- nix-store --gc
53
54.PHONY: setup ssh-eldiron info debug dry-run build upload deploy push pull pull-deployment list-generations delete-generations cleanup