mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-08-18 00:19:43 +02:00
feat: debug
This commit is contained in:
@@ -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`
|
||||
|
Reference in New Issue
Block a user