switch: reduce noise
This commit is contained in:
parent
2ad46d7442
commit
23a4ad6725
1 changed files with 4 additions and 3 deletions
7
switch
7
switch
|
|
@ -2,25 +2,26 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
nix fmt
|
nix fmt --option warn-dirty false
|
||||||
|
|
||||||
# Allow usage of untracked files in nix code
|
# Allow usage of untracked files in nix code
|
||||||
git add --intent-to-add .
|
git add --intent-to-add .
|
||||||
|
|
||||||
|
# I only use warn-dirty=false because of this
|
||||||
git --no-pager diff
|
git --no-pager diff
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
nixos-rebuild \
|
nixos-rebuild \
|
||||||
switch \
|
switch \
|
||||||
--sudo \
|
--sudo \
|
||||||
|
--option warn-dirty false \
|
||||||
--print-build-logs \
|
--print-build-logs \
|
||||||
--flake .# \
|
--flake .# \
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
if which nom >/dev/null; then
|
if which nom >/dev/null; then
|
||||||
run --verbose \
|
run --log-format internal-json \
|
||||||
--log-format internal-json \
|
|
||||||
"$@" \
|
"$@" \
|
||||||
|& nom --json
|
|& nom --json
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue