diff --git a/switch b/switch index 93bd80a..d341e87 100755 --- a/switch +++ b/switch @@ -1,12 +1,25 @@ #!/usr/bin/env bash +set -euo pipefail + nix fmt git --no-pager diff -nixos-rebuild \ - switch \ - --use-remote-sudo \ - --print-build-logs \ - --flake .# \ - "$@" +run() { + nixos-rebuild \ + switch \ + --use-remote-sudo \ + --print-build-logs \ + --flake .# \ + "$@" +} + +if which nom >/dev/null; then + run --verbose \ + --log-format internal-json \ + "$@" \ + |& nom --json +else + run "$@" +fi diff --git a/system/configuration.nix b/system/configuration.nix index 5db8efc..9b4bed3 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -44,6 +44,8 @@ usbutils # dracula-theme # gtk theme adwaita-icon-theme # default gnome cursors + + nix-output-monitor ]; services.geoclue2.enable = true;