Files
vargix-os/rebuild-nix.sh
Kurtis Andrews f3af5dd1b5 Update
builds are live now
2024-03-24 23:32:53 +10:00

19 lines
462 B
Bash
Executable File

#!/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 switch -I nixos-config=./$hostname.nix
fi
fi