From d8052788cceab4ab39eb57929394b0e6ee896297 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Fri, 15 Dec 2023 15:19:34 +0100 Subject: [PATCH] docs --- NixOS.md | 7 +++++++ 1 file changed, 7 insertions(+) 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)"