- ./scripts/nixops_wrap ssh eldiron -- nix-store --gc
-
-.PHONY: setup ssh-eldiron info debug dry-run build upload deploy push pull pull-deployment list-generations delete-generations cleanup
+ $(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
+pull_deployment:
+ @if nixops info -d $(NIXOPS_DEPLOYMENT) 2>/dev/null >/dev/null ; then \
+ echo "This will remove your current deployment file and recreate it!. Continue? [y/N]" && \
+ read y && \
+ [ "$$y" = "y" -o "$$y" = "Y" ] && \
+ nixops delete --force -d $(NIXOPS_DEPLOYMENT); \
+ fi
+ pass show Nixops/Deployment | nixops import
+ nixops modify -d $(NIXOPS_DEPLOYMENT) "$$(pwd)/default.nix"
+.PHONY: pull_deployment
+
+deployment_is_set:
+ nixops info -d $(NIXOPS_DEPLOYMENT) 2>/dev/null >/dev/null
+.PHONY: deployment_is_set
+
+###### Push deployment information to password store
+push_deployment:
+ nixops export | pass insert -m Nixops/Deployment
+.PHONY: push