work
Matthew Ess 2021-05-05 18:55:20 -04:00
parent cbbeb34cc4
commit 8082969258
2 changed files with 5 additions and 12 deletions

View File

@ -1,22 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
dest=$1 machine=$1
machine=$HOSTNAME
if [[ -z "$dest" ]]; then
dest="/etc/nixos/configuration.nix"
fi
if [[ -z "$machine" ]]; then if [[ -z "$machine" ]]; then
machine=default-name machine=$(hostname)
fi fi
if [[ ! -d "machines/$machine" || ! -f "machines/$machine/configuration.nix" ]]; then if [[ ! -d "machines/$machine" ]]; then
echo "$machine is not a known machine" echo "$machine is not a known machine"
echo "Run as \`env HOSTNAME=<MACHINE> ./install.sh\` to override."
exit exit
else else
echo "Linking ./machines/$machine/configuration.nix to $dest" echo "Linking ./machines/$machine/configuration.nix to /etc/nixos/configuration.nix"
fi fi
sudo ln -sf $PWD/machines/$machine/configuration.nix $dest sudo ln -sf $PWD/machines/$machine/configuration.nix /etc/nixos/configuration.nix

View File

@ -1 +0,0 @@
TODO