Nvd: Simple Nix/NixOS version diff tool

Thanks @madjar !

In my case (just nix + home-manager on a non-NixOS, report-switching not needed) it boiled down to:

{ config, pkgs, lib, ... }:

with lib;
let
  dag = config.lib.dag;
  nvd = import (pkgs.fetchFromGitLab {
    owner = "khumba";
    repo = "nvd";
    rev = "7cdaa6d818119bd7a51930d990fded5d594c6623";
    sha256 = "sha256-dQcfoMtRGg+SRvgY9pbSqlyeTozlHp3qE70egSEiFX0=";
  }) { inherit pkgs; };
in {
  home.activation.report-changes = dag.entryAnywhere ''
    ${nvd}/bin/nvd $oldGenPath $newGenPath
  '';
}

Awesome.

5 Likes