| 24 Oct 2025 |
hexa | if it exists, there is a store path for it | 23:10:29 |
hexa | or something like that | 23:10:41 |
hexa | I'm not an expert | 23:10:43 |
522 it/its ⛯ΘΔ | tbh i do feel that's better solved outside of the nix impl itself, at least in terms of "you don't need to change the GC" | 23:12:17 |
522 it/its ⛯ΘΔ | like: i have my direnv set to make gcroots in .cache, so they aren't removed until i explicitly delete that directory | 23:12:40 |
522 it/its ⛯ΘΔ | perhaps something similar can be done for "transient" paths like nix run nixpkgs#meowmeowmeow | 23:13:19 |
522 it/its ⛯ΘΔ | (that way, you can distinguish, in "userspace" (as opposed to in nix), between stuff that you want kept around and stuff that you don't actually care about) | 23:14:07 |
lillecarl | 522 it/its ⛯ΘΔ: What I'm asking for is an extra field which is automatically updated by Lix whenever a path is referenced somehow, if it's from "nix build" or "nix copy" or any other operation | 23:15:45 |
522 it/its ⛯ΘΔ | i used to run my gc daily and made some changes to my system in order to make that less annoying (explicitly considering flake inputs as system dependencies so they're kept, so a nix-store --gc ; nixos-rebuild build works even with no internet access) | 23:15:47 |
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 |
lillecarl | Yeah except it's entirely unreasonable to install and maintain gcroots on a binary cache, which is what I'm proposing this feature for, this doesn't matter much for your nixos configuration | 23:42:00 |
| 25 Oct 2025 |
| Rcat 🏳️🌈🏳️⚧️ changed their profile picture. | 06:14:46 |
raitobezarius | lillecarl: I think that the Lix project is not enthusiast into extending the SQLite database, we are more interested into deleting it atm; we would rather recommend to build a "lastRequired" information out of band and use GC roots to enforce it using the Lix's GC code | 09:45:22 |
KFears (burnt out) | In reply to @piegames:flausch.social Yes Would it make sense to stabilize forward pipe? | 11:05:51 |
Sofie 🏳️⚧️ (she/her) | Is there a way to get rid of this without well,,, patching Nixpkgs | 11:41:44 |
Katalin 🔪 | In reply to @piegames:flausch.social We currently have a backpipe operator, but it is not guaranteed to stay that’s disappointing to hear, I use it much more often than the forward pipe (currently 36 times vs 4 times in my main repo) and it would suck to lose it without a replacement. It’s very useful in removing levels of nested parentheses | 12:55:58 |
piegames | do you have some usage snippets for me to look at? | 12:56:32 |