X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2FMakefile;h=1852e7510c1754b9c7bb8092df3c5358d27e3aa3;hb=8a304ef46e1ad221253f883a8a296a12018e3d30;hp=69603a018ea95341f9e904d993dff4671bdffc1a;hpb=4506dbe51901f66406a02042b2097b3b3856e8a6;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/nixops/Makefile b/nixops/Makefile index 69603a0..1852e75 100644 --- a/nixops/Makefile +++ b/nixops/Makefile @@ -5,7 +5,7 @@ endif NIXOPS_STATE ?= ./state/eldiron.nixops NIXOPS_DEPLOYMENT = cef694f3-081d-11e9-b31f-0242ec186adf -nixpkgs ?= https://releases.nixos.org/nixos/19.03/nixos-19.03.172731.3efdf45dbd1/nixexprs.tar.xz +nixpkgs ?= https://releases.nixos.org/nixos/19.03/nixos-19.03.173677.daf861a810d/nixexprs.tar.xz NIX_PATH = nixpkgs=${nixpkgs}:nixpkgsNext=${nixpkgs}:nixpkgsPrevious=${nixpkgs} NIXOPS := $(shell NIX_PATH=$(NIX_PATH) nix-build --no-out-link -E "with import { overlays = builtins.attrValues (import ../overlays); }; nixops")/bin/nixops @@ -16,7 +16,7 @@ nix-info: @version=$$(nix eval --raw nixpkgs.lib.version) && \ mainversion=$$(echo $$version | cut -d"." -f -2) && \ echo "https://releases.nixos.org/nixos/$$mainversion/nixos-$$version/nixexprs.tar.xz" && \ - nix eval --raw nixpkgs.bc.meta.position | cut -d"/" -f-4 + nix-instantiate --find-file nixpkgs .PHONY: nix-info ###### Initial setup @@ -33,6 +33,15 @@ SSH_ARGS ?= ssh-eldiron: $(NIXOPS_PRIV) ssh eldiron -- $(SSH_ARGS) +ssh-dilion: + $(NIXOPS_PRIV) ssh dilion -- $(SSH_ARGS) + +ssh-backup-2: + $(NIXOPS_PRIV) ssh backup-2 -- $(SSH_ARGS) + +ssh-monitoring-1: + $(NIXOPS_PRIV) ssh monitoring-1 -- $(SSH_ARGS) + info: $(NIXOPS_PRIV) list $(NIXOPS_PRIV) info @@ -71,11 +80,17 @@ list-generations: delete-generations: nix-env -p $(profile) --delete-generations $(GEN) $(NIXOPS_PRIV) ssh eldiron -- nix-env -p /nix/var/nix/profiles/system --delete-generations $(GEN) + $(NIXOPS_PRIV) ssh dilion -- nix-env -p /nix/var/nix/profiles/system --delete-generations $(GEN) + $(NIXOPS_PRIV) ssh backup-2 -- nix-env -p /nix/var/nix/profiles/system --delete-generations $(GEN) + $(NIXOPS_PRIV) ssh monitoring-1 -- nix-env -p /nix/var/nix/profiles/system --delete-generations $(GEN) .PHONY: delete-generations cleanup: delete-generations nix-store --gc $(NIXOPS_PRIV) ssh eldiron -- nix-store --gc + $(NIXOPS_PRIV) ssh dilion -- nix-store --gc + $(NIXOPS_PRIV) ssh backup-2 -- nix-store --gc + $(NIXOPS_PRIV) ssh monitoring-1 -- nix-store --gc .PHONY: cleanup ###### Pull environment and deployment from remote