I’ve add these configurations
system.extraSystemBuilderCmds = ''
ln -s ${../../.} $out/nix-config
ln -s ${pkgs.path} $out/nix-pkgs
'';
to keep the previous nixpkgs and config. And I use sudo nixos-collect-garbage -d
regularly. And recently I found the link to the pkgs.path
broken after a garbage-collect. Why is that? Shouldn’t it be added to the gcroots?