system/testBuild.sh

15 lines
428 B
Bash
Raw Normal View History

2024-11-01 12:04:24 -04:00
#!/usr/bin/env bash
# Script to test config files before compile
cd ~/system
echo "Testing ~/system ..."
echo "running nixos-rebuild dry-build switch --flake '.#'"
if nixos-rebuild dry-build --flake '.#'; then
echo "running home-manager -n switch --flake"
home-manager -n switch --flake .
echo "If all went well proceede with buildsys and mkhome"
else
echo "nixos-rebuild --dry-run failed, exiting script."
exit 1
fi