mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
docs
This commit is contained in:
parent
9d66f0eaca
commit
d8052788cc
7
NixOS.md
7
NixOS.md
@ -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)"
|
||||||
|
Loading…
Reference in New Issue
Block a user