hackens-org-configurations/setupLinkFromHostname
2021-11-02 23:38:40 +01:00

11 lines
244 B
Bash
Executable file

#!/usr/bin/env bash
echo "Setting up $(hostname)"
HOST_FOLDER=hosts
HOSTNAME=$(hostname)
CONFIG=$HOST_FOLDER/$HOSTNAME.nix
if [[ -n $(cmp --silent configuration.nix "$CONFIG" || echo "different") ]]
then
ln -s "$CONFIG" configuration.nix
fi