switch: reduce noise

This commit is contained in:
Leonardo Eugênio 2026-02-22 13:07:32 -03:00
parent 2ad46d7442
commit 23a4ad6725

7
switch
View file

@ -2,25 +2,26 @@
set -euo pipefail
nix fmt
nix fmt --option warn-dirty false
# Allow usage of untracked files in nix code
git add --intent-to-add .
# I only use warn-dirty=false because of this
git --no-pager diff
run() {
nixos-rebuild \
switch \
--sudo \
--option warn-dirty false \
--print-build-logs \
--flake .# \
"$@"
}
if which nom >/dev/null; then
run --verbose \
--log-format internal-json \
run --log-format internal-json \
"$@" \
|& nom --json
else