2026-02-08 01:22:56 -05:00

21 lines
921 B
Bash
Executable File

#!/usr/bin/env bash
#
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
: "${JOBS:="1"}"
TARGET=deck@172.16.16.250
rsync -av --progress --delete --exclude=.git "$DIR/../../" "${TARGET}:~/.config/mynix"
rsync -av --progress --delete --exclude=.git "/persist/manual/manual_add_to_store" "${TARGET}:~/.persist/manual/"
# nix run --extra-experimental-features nix-command --extra-experimental-features flakes .#profile.switch
# ssh "${TARGET}" 'source /home/deck/.nix-profile/etc/profile.d/nix.sh && for f in ~/.persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done'
ssh "${TARGET}" "source /home/deck/.nix-profile/etc/profile.d/nix.sh && nix run --extra-experimental-features nix-command --extra-experimental-features flakes /home/deck/.config/mynix#profile.switch --show-trace"
# ssh "${TARGET}" 'cat .config/mynix/flake.lock' > "$DIR/../../flake.lock"