From e23d78c2144c032c0e076286c8185874876f7ffd Mon Sep 17 00:00:00 2001 From: oddlama Date: Sun, 15 Oct 2023 02:32:59 +0200 Subject: [PATCH] feat: add nvd output to deploy --- pkgs/deploy.nix | 4 ++++ users/modules/config/utils.nix | 1 + 2 files changed, 5 insertions(+) diff --git a/pkgs/deploy.nix b/pkgs/deploy.nix index bd02eaa..f59042b 100644 --- a/pkgs/deploy.nix +++ b/pkgs/deploy.nix @@ -101,8 +101,12 @@ for host in "''${HOSTS[@]}"; do store_path="''${TOPLEVEL_STORE_PATHS["$host"]}" echo " Applying ⚙️ $host" + prev_system=$(ssh "$host" -- readlink /nix/var/nix/profiles/system) ssh "$host" -- /run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set "$store_path" ssh "$host" -- "$store_path"/bin/switch-to-configuration "$ACTION" + if [[ -n "$prev_system" ]]; then + ssh "$host" -- nvd diff "$prev_system" "$store_path" + fi time_next echo " Applied ✅ $host in ''${T_LAST}s" done diff --git a/users/modules/config/utils.nix b/users/modules/config/utils.nix index c7103fe..f7f84bc 100644 --- a/users/modules/config/utils.nix +++ b/users/modules/config/utils.nix @@ -15,6 +15,7 @@ lib.optionalAttrs (!minimal) { killall ncdu neofetch + nvd rage rclone ripgrep