broke out scripts folder
This commit is contained in:
16
scripts/link-nix.sh
Normal file
16
scripts/link-nix.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "Error: No arguments provided."
|
||||
echo "Usage: $0 <path>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CURRENT=$(readlink -f /etc/nixos)
|
||||
sudo rm /etc/nixos
|
||||
echo "Unlinked $CURRENT"
|
||||
|
||||
sudo ln -s $1 /etc/nixos
|
||||
echo "Linked $(readlink -f /etc/nixos)"
|
||||
Reference in New Issue
Block a user