Configs for our NixOS servers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

14 lines
312 B

#!/bin/sh
if [ $# -ne 1 ]
then
echo "Usage: ./deploy.sh server_type"
exit
fi
chmod 644 configuration.nix
find $1 -type f -exec chmod 644 {} \;
find $1 -type d -exec chmod 755 {} \;
echo "Deploying to $1"
scp -r configuration.nix $1/* "root@$1:/etc/nixos/" && \
ssh "root@$1" 'nixos-rebuild switch'