Files
vargix-os/rebuild-nix.sh
Kurtis Andrews 825ac5d7eb Update
Updated config
updated scripts to work with nixos
2024-03-24 23:32:09 +10:00

19 lines
465 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 dry-build -I nixos-config=./$hostname.nix
fi
fi