From 3dda6367b1dbc0b6a633eeef0f6f2f9cf379118d Mon Sep 17 00:00:00 2001 From: truxnell <19149206+truxnell@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:41:40 +1100 Subject: [PATCH] feat: add nvd diff to all builds --- nixos/hosts/common/nixos/nix.nix | 7 +++++++ nixos/hosts/common/nixos/packages.nix | 1 + 2 files changed, 8 insertions(+) diff --git a/nixos/hosts/common/nixos/nix.nix b/nixos/hosts/common/nixos/nix.nix index c1ef9f3..e790933 100644 --- a/nixos/hosts/common/nixos/nix.nix +++ b/nixos/hosts/common/nixos/nix.nix @@ -1,5 +1,6 @@ { inputs , lib +, pkgs , ... }: { nix = { @@ -13,4 +14,10 @@ options = "--delete-older-than 5d"; }; }; + + # Enable printing changes on nix build etc with nvd + system.activationScripts.report-changes = '' + PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]} + nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2) + ''; } diff --git a/nixos/hosts/common/nixos/packages.nix b/nixos/hosts/common/nixos/packages.nix index 12bb716..c0c556c 100644 --- a/nixos/hosts/common/nixos/packages.nix +++ b/nixos/hosts/common/nixos/packages.nix @@ -14,6 +14,7 @@ dnsutils nvd gh + nix # TODO Move nil