nox/switch_remote.sh
2025-03-18 18:14:36 +01:00

16 lines
329 B
Bash
Executable file

#/usr/bin/env bash
# a small script for calling nixos-rebuild switch on a remote host but with less repitition
set -euo pipefail
ACTION=$1
HOST=$2
CONFIG=$3
set -x
exec nixos-rebuild $ACTION \
--use-substitutes \
--no-build-nix \
--use-remote-sudo \
--build-host $HOST \
--target-host $HOST \
--flake ".#${CONFIG}"