X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=Makefile;h=fafbe00f7eb21d456733cfdfeadf9b59d79a416e;hp=b8a5bfb58648377c12a3e85e2e0b4876b9a1d2e1;hb=441da8aac378f401625e82caf281fa0e26128310;hpb=e96787f10b97d2b3b6f8917408f69a0eb500ea97 diff --git a/Makefile b/Makefile index b8a5bfb..fafbe00 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,18 @@ -subrecipes = setup ssh-eldiron info debug dry-run build upload deploy reboot push pull pull-deployment list-generations delete-generations cleanup +subrecipes = setup +subrecipes += nixops ssh-eldiron ssh-backup-2 ssh-monitoring-1 +subrecipes += info debug dry-run build upload deploy deploy-reboot reboot +subrecipes += list-generations delete-generations cleanup +subrecipes += pull pull_environment pull_deployment deployment_is_set push push_deployment push_environment ${subrecipes}: @$(MAKE) --no-print-directory -C nixops/ $@ +.PHONY: ${subrecipes} + +# This will automatically upgrade to latest version at each build +nixpkgs ?= https://nixos.org/channels/nixos-19.03/nixexprs.tar.xz +NIX_PATH = nixpkgs=${nixpkgs}:nixpkgsNext=${nixpkgs}:nixpkgsPrevious=${nixpkgs} + +nix-path: + @echo "export NIX_PATH=$(NIX_PATH)" env: ./scripts/make-env @@ -9,15 +21,19 @@ env-dry-run: ./scripts/make-env --dry-run nix-info: - NIXOPS_DEPLOYMENT="" ./scripts/nix_infos + @version=$$(nix eval --option tarball-ttl 1 --raw nixpkgs.lib.version) && \ + mainversion=$$(echo $$version | cut -d"." -f -2) && \ + echo "https://releases.nixos.org/nixos/$$mainversion/nixos-$$version/nixexprs.tar.xz" && \ + nix-instantiate --find-file nixpkgs nix-info-nixops: - NIXOPS_DEPLOYMENT="n" ./scripts/nix_infos + @$(MAKE) --no-print-directory -C nixops/ nix-info nur: ./scripts/make-nur + curl -o /dev/null -XPOST "https://nur-update.herokuapp.com/update?repo=immae" shellcheck: shellcheck scripts/* nixops/scripts/* modules/private/gitolite/gitolite_ldap_groups.sh modules/private/ssh/ldap_authorized_keys.sh modules/private/pub/restrict -.PHONY: env env-dry-run nix-info nix-info-nixops nur shellcheck +.PHONY: env env-dry-run nix-info nur shellcheck