feat: debug

This commit is contained in:
Ryan Yin
2024-03-08 14:07:29 +08:00
parent 9326ad86ba
commit cff6c24370
8 changed files with 24 additions and 14 deletions

View File

@@ -2,10 +2,14 @@
## Show detailed error messages
You can always try to add `--show-trace -L` to the `nixos-rebuild` command to get the detailed error message if you encounter any errors during the deployment. e.g.
You can always try to add `--show-trace --print-build-logs --verbose` to the `nixos-rebuild` command to get the detailed error message if you encounter any errors during the deployment. e.g.
```bash
sudo nixos-rebuild switch --flake .#myhost --show-trace -L
cd /etc/nixos
sudo nixos-rebuild switch --flake .#myhost --show-trace --print-build-logs --verbose
# A more concise version
sudo nixos-rebuild switch --flake .#myhost --show-trace -L -v
```
## Debugging with `nix repl`