Add some documentation to the readme and justfile

This commit is contained in:
Lillian Violet 2025-08-28 13:35:52 +02:00
parent 13a8d925bb
commit a7cdc4d20d
2 changed files with 12 additions and 2 deletions

View file

@ -1,22 +1,29 @@
# Build the nixos configuration and switch to it
build:
sudo echo "sudo check..." && sudo nixos-rebuild --log-format internal-json -v switch --flake .# --show-trace |& nom --json
# Build the nixos configuration bot don't switch to it until a reboot
boot:
sudo echo "sudo check..." && sudo nixos-rebuild --log-format internal-json -v boot --flake .# --show-trace |& nom --json
# Run the nix flake in the nix repl
run:
nix-repl -f flake:nixpkgs
# Check the nix configuration for errors
test:
sudo echo "sudo check..." && sudo nix flake check --show-trace --log-format internal-json -v |& nom --json
# Update the flake lock
update:
nix flake update --log-format internal-json -v |& nom --json && zsh
# Clean your nix store and optimize it
clean:
sudo nix-collect-garbage
sudo nix-store --optimise
# Set up the commit hook for testing before doing a commit
setup:
#!/run/current-system/sw/bin/bash -e
if [ -s ./.git/hooks/pre-commit ]; then
@ -30,8 +37,8 @@ setup:
else
echo "just test" >> ./.git/hooks/pre-commit && chmod +x ./.git/hooks/pre-commit
fi
# Make sure all the git actions of pulling, adding all files, committing, and pushing are done in one command
push:
git pull
git add *