summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-25 15:11:11 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-25 00:04:22 +0200
commita8e4bf7554dc7219b23c0ff076321f62c24b2b82 (patch)
tree0f6f2512811374036e29d9c66e18fff1f20cadc1 /Makefile
parent6afdbd8c052a347284772d6d7b2d90977f174018 (diff)
downloadNUR-a8e4bf7554dc7219b23c0ff076321f62c24b2b82.tar.gz
NUR-a8e4bf7554dc7219b23c0ff076321f62c24b2b82.tar.zst
NUR-a8e4bf7554dc7219b23c0ff076321f62c24b2b82.zip
Use Makefile for some env/deploy scripts
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 62a0f9d5..3ab58cf6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,17 @@
1subrecipes = setup ssh-eldiron info debug dry-run build upload deploy reboot push pull pull-deployment list-generations delete-generations cleanup 1subrecipes = setup
2subrecipes += nixops ssh-eldiron info debug dry-run build upload deploy deploy-reboot reboot
3subrecipes += list-generations delete-generations cleanup
4subrecipes += pull pull_environment pull_deployment deployment_is_set push push_deployment push_environment
2${subrecipes}: 5${subrecipes}:
3 @$(MAKE) --no-print-directory -C nixops/ $@ 6 @$(MAKE) --no-print-directory -C nixops/ $@
7.PHONY: ${subrecipes}
8
9# This will automatically upgrade to latest version at each build
10nixpkgs ?= https://nixos.org/channels/nixos-19.03/nixexprs.tar.xz
11NIX_PATH = nixpkgs=${nixpkgs}:nixpkgsNext=${nixpkgs}:nixpkgsPrevious=${nixpkgs}
12
13nix-path:
14 @echo "export NIX_PATH=$(NIX_PATH)"
4 15
5env: 16env:
6 ./scripts/make-env 17 ./scripts/make-env
@@ -9,10 +20,13 @@ env-dry-run:
9 ./scripts/make-env --dry-run 20 ./scripts/make-env --dry-run
10 21
11nix-info: 22nix-info:
12 NIXOPS_DEPLOYMENT="" ./scripts/nix_infos 23 @version=$$(nix eval --raw nixpkgs.lib.version) && \
24 mainversion=$$(echo $$version | cut -d"." -f -2) && \
25 echo "https://releases.nixos.org/nixos/$$mainversion/nixos-$$version/nixexprs.tar.xz" && \
26 nix eval --raw nixpkgs.bc.meta.position | cut -d"/" -f-4
13 27
14nix-info-nixops: 28nix-info-nixops:
15 NIXOPS_DEPLOYMENT="n" ./scripts/nix_infos 29 @$(MAKE) --no-print-directory -C nixops/ nix-info
16 30
17nur: 31nur:
18 ./scripts/make-nur 32 ./scripts/make-nur
@@ -21,4 +35,4 @@ nur:
21shellcheck: 35shellcheck:
22 shellcheck scripts/* nixops/scripts/* modules/private/gitolite/gitolite_ldap_groups.sh modules/private/ssh/ldap_authorized_keys.sh modules/private/pub/restrict 36 shellcheck scripts/* nixops/scripts/* modules/private/gitolite/gitolite_ldap_groups.sh modules/private/ssh/ldap_authorized_keys.sh modules/private/pub/restrict
23 37
24.PHONY: env env-dry-run nix-info nix-info-nixops nur shellcheck 38.PHONY: env env-dry-run nix-info nur shellcheck