diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -1,6 +1,17 @@ | |||
1 | subrecipes = setup ssh-eldiron info debug dry-run build upload deploy reboot push pull pull-deployment list-generations delete-generations cleanup | 1 | subrecipes = setup |
2 | subrecipes += nixops ssh-eldiron info debug dry-run build upload deploy deploy-reboot reboot | ||
3 | subrecipes += list-generations delete-generations cleanup | ||
4 | subrecipes += 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 | ||
10 | nixpkgs ?= https://nixos.org/channels/nixos-19.03/nixexprs.tar.xz | ||
11 | NIX_PATH = nixpkgs=${nixpkgs}:nixpkgsNext=${nixpkgs}:nixpkgsPrevious=${nixpkgs} | ||
12 | |||
13 | nix-path: | ||
14 | @echo "export NIX_PATH=$(NIX_PATH)" | ||
4 | 15 | ||
5 | env: | 16 | env: |
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 | ||
11 | nix-info: | 22 | nix-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 | ||
14 | nix-info-nixops: | 28 | nix-info-nixops: |
15 | NIXOPS_DEPLOYMENT="n" ./scripts/nix_infos | 29 | @$(MAKE) --no-print-directory -C nixops/ nix-info |
16 | 30 | ||
17 | nur: | 31 | nur: |
18 | ./scripts/make-nur | 32 | ./scripts/make-nur |
@@ -21,4 +35,4 @@ nur: | |||
21 | shellcheck: | 35 | shellcheck: |
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 |