Add script to copy hardware-configuration
This commit is contained in:
14
bin/copy-hardware-configuration.sh
Executable file
14
bin/copy-hardware-configuration.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/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
|
||||||
Reference in New Issue
Block a user