You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nix-build (a perl script) calls nix-store with --add-root and--indirect. These results in theresultlinks to be referenced in/nix/var/nix/gcroots/auto` and therefore protects them from garbage collection.
Hi, any progress about this topic? I had to implement already few times hacks like:
-> either using nix-build with --add-root but then reinvent the wheel and add the nix-env details on top of it (hack!)
-> use nix-env and add manually the gcroots, this is again hackish
In extreme case I could contribute with a PR, but not clear what was the initial design intention.
I would find this as a powerful feature when you want for instance to use shared /nix for containers (with for read only /nix) where you prepare an env for the container, you run the container(Z) and then you do garbage collection time to time.
Profiles should be created in a directory searched for GC roots, such as /nix/var/nix/profiles. I guess it would be good if Nix warned if a profile is not in such a directory.
Activity
zokrezyl commentedon Oct 4, 2019
Hi, any progress about this topic? I had to implement already few times hacks like:
-> either using nix-build with --add-root but then reinvent the wheel and add the nix-env details on top of it (hack!)
-> use nix-env and add manually the gcroots, this is again hackish
In extreme case I could contribute with a PR, but not clear what was the initial design intention.
I would find this as a powerful feature when you want for instance to use shared /nix for containers (with for read only /nix) where you prepare an env for the container, you run the container(Z) and then you do garbage collection time to time.
Thanks in advance for clarification.
edolstra commentedon Oct 4, 2019
Profiles should be created in a directory searched for GC roots, such as
/nix/var/nix/profiles. I guess it would be good if Nix warned if a profile is not in such a directory.stale commentedon Feb 16, 2021
I marked this as stale due to inactivity. → More info
stale commentedon Apr 30, 2022
I closed this issue due to inactivity. → More info
Merge pull request NixOS#148 from DeterminateSystems/conditional-manual
doc/inventory/candidates: cross-reference cleanup branches
doc/inventory: consolidate four-pass review into the catalog
libutil: small cleanups in current-process and util.hh
libutil/unix/signals: clarify why getInterruptCallbacks leak is load-…
doc/inventory: STATUS — record bidirectional audit + orphan-commit fi…
doc/inventory: Batch B — strike off doc-branch corrections
v3 ARCH NixOS#148 (C2.1): persistent HAMT attrset design — the NixOS#1 …
tomberek commentedon Aug 13, 2026
Closing as stale. Re-open if needed.