This commit is contained in:
Daniel Langbein 2023-12-15 15:19:34 +01:00
parent 9d66f0eaca
commit d8052788cc
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002

View File

@ -221,6 +221,13 @@ ls -1 /nix/var/nix/profiles/ | sort -t'-' -n -k2 | tail -n 1
Compare current with previous profile: 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 ```shell
# https://stackoverflow.com/a/36641298 # https://stackoverflow.com/a/36641298
prev="$(ls -1 /nix/var/nix/profiles/ | sort -t'-' -n -k2 | tail -n 2 | head -n 1)" prev="$(ls -1 /nix/var/nix/profiles/ | sort -t'-' -n -k2 | tail -n 2 | head -n 1)"