diff --git a/NixOS.md b/NixOS.md index 077f48c..9c5411c 100644 --- a/NixOS.md +++ b/NixOS.md @@ -221,6 +221,13 @@ ls -1 /nix/var/nix/profiles/ | sort -t'-' -n -k2 | tail -n 1 Compare current with previous profile: +```shell +# https://discourse.nixos.org/t/how-to-know-what-nixpkgs-changes-affect-me/18142/6 +prev="$(ls -r /nix/var/nix/profiles/ | grep -E 'system\-' | sed -n '2 p')" +curr=/nix/var/nix/profiles/system +nix --extra-experimental-features nix-command store diff-closures /nix/var/nix/profiles/"${prev}" "${curr}" +``` + ```shell # https://stackoverflow.com/a/36641298 prev="$(ls -1 /nix/var/nix/profiles/ | sort -t'-' -n -k2 | tail -n 2 | head -n 1)"