diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-12-13 21:25:24 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-24 01:40:13 +0200 |
commit | 252dd7d899b7a0deea1537cc5d2d48b825afffb0 (patch) | |
tree | f51c3c9cd7429b0b9553a840f26bee489be045bc /nixops/Makefile | |
download | NUR-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/Makefile | 54 |
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 @@ | |||
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 | reboot: | ||
27 | ./scripts/nixops_wrap reboot --include=eldiron | ||
28 | |||
29 | push: | ||
30 | ./scripts/push_deployment | ||
31 | ./scripts/push_environment | ||
32 | |||
33 | pull: | ||
34 | ./scripts/pull_environment | ||
35 | |||
36 | pull-deployment: | ||
37 | ./scripts/pull_deployment | ||
38 | |||
39 | profile = $(shell ./scripts/nixops_wrap info | grep "^Nix profile: " | sed -e "s/^Nix profile: //") | ||
40 | GEN ?= "+3" | ||
41 | |||
42 | list-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 | |||
46 | delete-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 | |||
50 | cleanup: 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 | ||