Updated config
updated scripts to work with nixos
This commit is contained in:
Kurtis Andrews
2024-03-24 23:32:09 +10:00
parent c23f5f8032
commit 825ac5d7eb
5 changed files with 31 additions and 7 deletions

19
rebuild-nix.sh Executable file
View 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