diff --git a/.build.yml b/.build.yml index 0297938..f6c79c7 100644 --- a/.build.yml +++ b/.build.yml @@ -5,7 +5,15 @@ environment: NIX_CONFIG: "experimental-features = nix-command flakes" shell: true tasks: - - setup: | + - check format: | cd triviOS - - build: | - nix build ./triviOS\#nixosConfigurations.triviOS.config.system.build.toplevel --print-build-logs + nix fmt + git diff-index --quiet HEAD -- + diff=$? + + if [ "$diff" -eq 1 ]; then + echo "Invalid format." + exit 1 + else + echo "Done." + fi