!9IQChSjwSHXPPWTa:lix.systems

Lix

1126 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms312 Servers

Load older messages


SenderMessageTime
30 Mar 2026
@blastboomstrice:4d2.orgBlastboom StriceNow thats much easier19:40:16
@charles:computer.surgeryCharlessay 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:computer.surgeryCharles 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
@griff79:matrix.orggriff Charles: it is probably in this format: https://snix.dev/docs/reference/nix-daemon-protocol/types/#export-path-format 00:11:05
@griff79:matrix.orggriff 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:computer.surgeryCharles 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:computer.surgeryCharles the point of --dump was just to show that the docs seem to be lying in some capacity 00:15:19
@charles:computer.surgeryCharles * the point of --dump was just to show that the docs of --import seem to be lying in some capacity 00:15:30
@griff79:matrix.orggriffNot so much lying as omitting the fact that it also needs info about its store path references.00:17:46
@charles:computer.surgeryCharleseither way, this means i would need my program to compute the store path ahead of time, which i don't immediately know how to do00:18:40
@griff79:matrix.orggriffIt is an old and stupid format. but unless you want to talk daemon, probably the easiest.00:18:53
@charles:computer.surgeryCharlesyeah, i would rather use the client programs to avoid being dependent on any particular nix implementation00:19:21
@griff79:matrix.orggriffsnix, nix.rs and harmonia has code for making the store path00:19:42
@charles:computer.surgeryCharles do you happen to know whether nix-store --import buffers everything in memory or can it stream the input 00:20:20
@griff79:matrix.orggriffAll 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
@griff79:matrix.orggriffI 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:computer.surgeryCharleshmm okay00:24:12
@charles:computer.surgeryCharlesthis seems more or less doable then, thank you00:25:12
@charles:computer.surgeryCharles(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
@blokyk:matrix.orgzoë (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 ears08:31:53
@blokyk:matrix.orgzoë (she/her) * 08:37:12
@blokyk:matrix.orgzoë (she/her) * 08:37:21
@srtcd424:auxolotl.orgtc424 (Steve D)Does lix actually support single-user these days? I thought it was pretty deprecated08:45:01
@yuka:yuka.devYureka (she/her)I regularly use lixStatic on systems which don't have a /nix/store08:53:27
@yuka:yuka.devYureka (she/her) simply by setting store = /home/yuka/store in my ~/.config/nix/nix.conf 08:54:02
@yuka:yuka.devYureka (she/her)then I can nix build stuff and it appears in /home/yuka/store/nix/store08:54:13
@yuka:yuka.devYureka (she/her)Redacted or Malformed Event08:54:18
@yuka:yuka.devYureka (she/her)obviously it can't be executed from there08:54:22
@yuka:yuka.devYureka (she/her)but it's still useful for remote builds08:54:30
@yuka:yuka.devYureka (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

There are no newer messages yet.


Back to Room ListRoom Version: 10