From bfe92e0ed9602c475f3ff1b7e02f6c4d584fa4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 4 Feb 2025 23:46:58 -0300 Subject: [PATCH] flake: add nix-output-monitor --- switch | 25 +++++++++++++++++++------ system/configuration.nix | 2 ++ 2 files changed, 21 insertions(+), 6 deletions(-) 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;