SSH_ARGS ?=
edit_env:
- pass edit Nixops/files/environment.nix || true
+ $(EDITOR) secrets/environment.nix || true
+ git -C secrets add environment.nix || true
+ git -C secrets commit -m "Edit environment.nix" environment.nix || true
+
+edit_vars:
+ sops secrets/vars.yml || true
+ git -C secrets add vars.yml || true
+ git -C secrets commit -m "Edit password for vars.yml using sops." vars.yml || true
ssh-eldiron:
./scripts/with_env bash -c 'ssh -i $$SSH_IDENTITY_FILE root@eldiron $(SSH_ARGS)'
./scripts/with_env morph deploy default.nix switch --keep-result --upload-secrets $(MORPH_ARGS)
nix-env -p $(PROFILE) --set .gcroots/default.nix
+next-boot:
+ ./scripts/with_env morph deploy default.nix boot --keep-result --upload-secrets $(MORPH_ARGS)
+ nix-env -p $(PROFILE) --set .gcroots/default.nix
+
deploy-reboot:
./scripts/with_env morph deploy default.nix boot --reboot --upload-secrets $(MORPH_ARGS)
.PHONY: list-generations
delete-generations:
+ @echo "making sure that a complete build is done before cleaning up"
+ $(MAKE) build MORPH_ARGS=--keep-result
nix-env -p $(PROFILE) --delete-generations $(GEN)
$(MAKE) ssh-eldiron SSH_ARGS="nix-env -p /nix/var/nix/profiles/system --delete-generations $(GEN)"
$(MAKE) ssh-dilion SSH_ARGS="nix-env -p /nix/var/nix/profiles/system --delete-generations $(GEN)"