15 lines
307 B
Bash
Executable File
15 lines
307 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
TOP="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/.."
|
|
|
|
if [ $# != 1 ]; then
|
|
echo "usage: copy-hardware-configuration.sh name"
|
|
exit 1
|
|
fi
|
|
|
|
node=$1
|
|
|
|
[ -e $node.nix ] && mv $node.nix $node.nix.bak
|
|
|
|
scp root@$node:/etc/nixos/hardware-configuration.nix $node.nix
|