Update
Updated config updated scripts to work with nixos
This commit is contained in:
19
rebuild-nix.sh
Executable file
19
rebuild-nix.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Okay need to get the hostname and see if this exists in our list of items.
|
||||
|
||||
hostname=$(hostname -f)
|
||||
|
||||
if [ $hostname == "nixos" ]
|
||||
then
|
||||
echo "This distro has not been initialised"
|
||||
else
|
||||
# Need to check if the nix file exists
|
||||
if [[ ! -f "$hostname.nix" ]]
|
||||
then
|
||||
echo "Your host does not have a config"
|
||||
else
|
||||
echo "Performing Build"
|
||||
sudo nixos-rebuild dry-build -I nixos-config=./$hostname.nix
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user