Home Manager Diff (hmd
) is a wrapper around nvd, that simplifies the process of comparing different Home-Manager generations.
It also provides an activation
script that runs hmd
during home-manager switch
, showing the differences between the latest and current generations.
Warning Only works with standalone Home-Manager installation at the moment.
In your flake.nix
:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager-diff.url = "github:pedorich-n/home-manager-diff";
};
outputs = { self, nixpkgs, home-manager, home-manager-diff }: {
homeConfigurations.example = home-manager.lib.homeManagerConfiguration {
...
modules = [
home-manager-diff.hmModules.default
./configuration.nix
];
};
};
}
configuration.nix
:
{...}: {
programs.hmd = {
enable = true;
runOnSwitch = true; # enabled by default
};
}
After the installation, simply run home-manager switch
as usual. HMD will automatically show the differences between the latest and current generations.
You can also run hmd
from CLI to compare any two Home-Manager generations.
Here's an example what hmd
prints out on a home-manager switch
. In this generation neovim
was added and wslu
removed:
And here's ane example of comparing any two Home-Manager generations using hmd
: