add script to setup configuration.nix link
This commit is contained in:
parent
e3372c61a9
commit
18d874e874
1 changed files with 11 additions and 0 deletions
11
setupLinkFromHostname
Executable file
11
setupLinkFromHostname
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/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
|
Loading…
Reference in a new issue