Skip to content

Instantly share code, notes, and snippets.

@ottidmes
Last active November 30, 2018 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ottidmes/4708d005fa1feb018fbb1fa339cbd071 to your computer and use it in GitHub Desktop.
Save ottidmes/4708d005fa1feb018fbb1fa339cbd071 to your computer and use it in GitHub Desktop.
nixos-system-diff() {
local old_drv new_drv
old_drv=$(nix-store --query --deriver "$(readlink --canonicalize-existing /nix/var/nix/profiles/system)") &&
new_drv=$(nix-instantiate --quiet '<nixpkgs/nixos>' --attr system) &&
nix-diff "$old_drv" "$new_drv"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment