build: sudo echo "sudo check..." && sudo nixos-rebuild --log-format internal-json -v switch --flake .# --show-trace |& nom --json boot: sudo echo "sudo check..." && sudo nixos-rebuild --log-format internal-json -v boot --flake .# --show-trace |& nom --json run: nix-repl -f flake:nixpkgs test: sudo echo "sudo check..." && sudo nix flake check --show-trace --log-format internal-json -v |& nom --json update: nix flake update --log-format internal-json -v |& nom --json && zsh clean: sudo nix-collect-garbage sudo nix-store --optimise setup: #!/run/current-system/sw/bin/bash -e if [ -s ./.git/hooks/pre-commit ]; then read -p $"This file already contains the following text: $(<./.git/hooks/pre-commit) Do you want to add the test hook (y/N)? (This will NOT delete data)" choice case "$choice" in y|Y ) echo "just test" >> ./.git/hooks/pre-commit && chmod +x ./.git/hooks/pre-commit && echo "Added test hook to pre-commit.";; * ) echo "No test added to pre-commit.";; esac else echo "just test" >> ./.git/hooks/pre-commit && chmod +x ./.git/hooks/pre-commit fi push: git pull git add * read -p "Commit message: " -r message && git commit -m "$message" git push