aboutsummaryrefslogtreecommitdiff
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>2019-05-27 01:42:18 +0200
commit4506dbe51901f66406a02042b2097b3b3856e8a6 (patch)
tree70f877fb285fd3df5a32cd01336bb142f8317e77 /Makefile
parent2232653330cedd11ac2aa64bdac994137cb26e80 (diff)
downloadNix-4506dbe51901f66406a02042b2097b3b3856e8a6.tar.gz
Nix-4506dbe51901f66406a02042b2097b3b3856e8a6.tar.zst
Nix-4506dbe51901f66406a02042b2097b3b3856e8a6.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 62a0f9d..3ab58cf 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