| 30 Aug 2025 |
Claes | I published my secrets management module here : https://github.com/claes/hemlis | 13:25:39 |
| 1 Sep 2025 |
lillecarl | Nice Claes! I'll have a look later tonight | 15:12:58 |
lillecarl | I've got a thing to share which I thought can be quite useful. The nix.db database contains a field called "registrationTime" which nix-collect-garbage --delete-older-than Xd uses.
I(Claude) wrote a little Python script to "touch" all dependencies (optionally including build dependencies) in the database so that recently built things don't get garbage collected if you run with the age options
https://gist.github.com/Lillecarl/a08759fdc8f264eb237e46fd0ef16c40 <- I just tested that it does what I want it to-ish so don't go break your DB with this :p
Something something --dry-run and --info also needs sudo because something something sqlite WAL needs write access even when only reading (?). I might just tmpclone the db for read ops 😄
The reason I made this is to make garbage collection more dynamic for the Nix CSI driver i've been spamming about. | 15:18:35 |
Claes | I forgot if it is possible but I would like combine the age limit with a generation limit. Something like gc everything older than 7 days but keep at least 5 generations | 16:46:43 |
chreekat | There's https://search.nixos.org/options?channel=25.05&show=boot.loader.grub.configurationLimit&query=grub. but it's a maximum, not a minimum :/ | 17:21:52 |
lillecarl | The nix sqlite database is really simple. Once I'm done cursing over replacing hardlinks with bind-mounts (hopefully) this'll be a good project | 19:57:57 |