20 lines
		
	
	
		
			902 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			902 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| #
 | |
| set -euo pipefail
 | |
| IFS=$'\n\t'
 | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 | |
| 
 | |
| : "${JOBS:="1"}"
 | |
| 
 | |
| #TARGET=10.216.1.14
 | |
| # TARGET=192.168.211.250
 | |
| TARGET=hydra
 | |
| 
 | |
| nix flake update zsh-histdb --flake "$DIR/../../"
 | |
| nix flake update ansible-sshjail --flake "$DIR/../../"
 | |
| for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
 | |
| 
 | |
| nixos-rebuild boot --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
 | |
| 
 | |
| # rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#hydra'
 | 
