Revert
parent
cbbeb34cc4
commit
8082969258
16
install.sh
16
install.sh
|
@ -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
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
TODO
|
|
Loading…
Reference in New Issue