arnaucube
arnaucube/configsPublic Self-hosted repository
configs/backup-nixos-configs.sh
backup-nixos-configs.shRaw
 1#!/usr/bin/env bash
 2
 3DEVICE=$1
 4
 5if [ -z $DEVICE ] ; then
 6	echo "missing 1st argument (DEVICE), ie. the name of the device where the backup is being done (eg. thinkpad, surface)"
 7	exit 1
 8fi
 9
10cp /etc/nixos/* ./nixos/
11mv ./nixos/configuration.nix ./nixos/$DEVICE-configuration.nix