| 24 Oct 2025 |
lillecarl | Once I have that metadata available I can build the GC myself, np | 23:15:59 |
522 it/its ⛯ΘΔ | you'd be unable to use the nix GC then, no?
if you have dead store paths that you want to keep around
unless you're making/deleting gcroots for them automatically | 23:17:02 |
lillecarl | But now I have to run "nix build && nix-touch" or "nix copy && nix-touch" where nix-touch is a program I've written that updates registrationtime of packages, which works but is | 23:17:27 |
lillecarl | Yeah I'd just never use the GC, I would use nix-store --gc --print-dead and query the database for when they were last referenced, then call "nix-store --delete" | 23:18:16 |
lillecarl | This is not very useful for a single machine/configuration workflow, it's useful when you're building a binary cache where you never install anything into gcroots | 23:19:48 |
lillecarl | (And I have to operate on db.sqlite myself, which is... "scary") | 23:20:59 |
lillecarl | (And it suxx a bit since updating registrationtime isn't possible without superduper permissions) so I have to do setup sudoers to trust nix-touch and execute as root) | 23:25:20 |
lillecarl | * (And it suxx a bit since updating registrationtime isn't possible without superduper permissions) so I have to do setup sudoers to trust nix-touch and execute as root | 23:25:26 |
lillecarl | * (And it suxx a bit since updating registrationtime isn't possible without superduper permissions so I have to do setup sudoers to trust nix-touch and execute as root) | 23:31:35 |
lillecarl | 522 it/its ⛯ΘΔ: But also: Even the default GC is a bit eager at removing things as it is right now. It'll happily remove anything you don't have in gcroots even if you fetched it five minutes ago, the likelyhood that you're going to use something you fetched 5 minutes ago is pretty high... 😄 | 23:33:26 |
522 it/its ⛯ΘΔ | i mean i do personally think time shouldn't really be a factor in gc, since that's kinda fragile | 23:35:55 |
522 it/its ⛯ΘΔ | the correct way to do this imoimo is to add stuff to gcroots | 23:36:46 |
lillecarl | 🤷 There's a reason why nixbuild, attic and cachix do something similar but ofc it's a perfectly valid opinion to leave QOL features to external tools | 23:40:05 |
522 it/its ⛯ΘΔ | like, once you have "nix run makes a gcroot in a specified directory" then you can do your own gc management on that yourself without involving nix code | 23:40:53 |