| 30 Mar 2026 |
Blastboom Strice | Now thats much easier | 19:40:16 |
Charles | say i have a program that knows paths and contents of files, and it wants to put all of those files into a single nix store path. is there any command that lix provides that could accept data from that program (say, over stdin in whatever format lix wants) to then put into a store path on the program's behalf? | 22:58:44 |
Charles | i think nix-store --import is the closest to what i want but i'm not sure the exact format of data that command accepts is documented anywhere. at the top of https://docs.lix.systems/manual/lix/stable/command-ref/nix-store/import.html it says "import Nix Archive into the store" (emphasis mine) and yet nix-store --dump ./some-file | nix-store --import fails with error: input doesn't look like something created by 'nix-store --export' | 23:13:07 |
| 31 Mar 2026 |
griff | Charles: it is probably in this format: https://snix.dev/docs/reference/nix-daemon-protocol/types/#export-path-format | 00:11:05 |
griff | And you probably want to export with https://docs.lix.systems/manual/lix/stable/command-ref/nix-store/export.html and not --dump | 00:12:49 |
Charles | well, the thing is that i would be writing my own program to generate the data that gets fed to nix-store --import (or something) | 00:13:12 |
Charles | the point of --dump was just to show that the docs seem to be lying in some capacity | 00:15:19 |
Charles | * the point of --dump was just to show that the docs of --import seem to be lying in some capacity | 00:15:30 |
griff | Not so much lying as omitting the fact that it also needs info about its store path references. | 00:17:46 |
Charles | either way, this means i would need my program to compute the store path ahead of time, which i don't immediately know how to do | 00:18:40 |
griff | It is an old and stupid format. but unless you want to talk daemon, probably the easiest. | 00:18:53 |
Charles | yeah, i would rather use the client programs to avoid being dependent on any particular nix implementation | 00:19:21 |
griff | snix, nix.rs and harmonia has code for making the store path | 00:19:42 |
Charles | do you happen to know whether nix-store --import buffers everything in memory or can it stream the input | 00:20:20 |
griff | All Nix implementations talk more or less the same daemon protocol. It is kind of locked and one of the reasons Lix wants to move to something they control. | 00:21:07 |
griff | I think I recall that it buffers in memory and writes a temp file if there is too much data. But it is several years since I looked at it. | 00:22:50 |
Charles | hmm okay | 00:24:12 |
Charles | this seems more or less doable then, thank you | 00:25:12 |
Charles | (the goal is pure eval for non-flakes nix, and this is necessary for filtering what ends up in the store prior to initiating pure eval) | 00:26:55 |
zoë (she/her) | this might just be me being dumb, but is there any instructions for doing a single-user lix install (specifically, without being root, and specifically with a different prefix than /nix)? or better yet, anyway to do it with the installer? i know the official cppnix one has a single-user mode (though it still puts stuff in /nix), but if there's an easier way than bootstrapping lix through cppnix i'd be all ears | 08:31:53 |
zoë (she/her) | * | 08:37:12 |
zoë (she/her) | * | 08:37:21 |
tc424 (Steve D) | Does lix actually support single-user these days? I thought it was pretty deprecated | 08:45:01 |
Yureka (she/her) | I regularly use lixStatic on systems which don't have a /nix/store | 08:53:27 |
Yureka (she/her) | simply by setting store = /home/yuka/store in my ~/.config/nix/nix.conf | 08:54:02 |
Yureka (she/her) | then I can nix build stuff and it appears in /home/yuka/store/nix/store | 08:54:13 |
Yureka (she/her) | Redacted or Malformed Event | 08:54:18 |
Yureka (she/her) | obviously it can't be executed from there | 08:54:22 |
Yureka (she/her) | but it's still useful for remote builds | 08:54:30 |
Yureka (she/her) | and when I really want to execute things from there I can use bubblewrap or unshare to do an unprivileged bind-mount of /home/yuka/store/nix to /nix | 08:55:06 |