!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-rooms311 Servers

Load older messages


SenderMessageTime
15 Mar 2026
@antifuchs:asf.computerantifuchsthe nix-prefetch expression magic is really nice, if only it worked in my ci setup (or if only I could figure out why it's trying to evoke an attribute on fetchgit that doesn't exist there but exists on my dev machine)00:41:58
@antifuchs:asf.computerantifuchsthis whole hermetics thing is very convenient, until it goes away00:42:23
@sofiedotcafe:catgirl.cloudSofie 🏳️‍⚧️🐾 (she/her) K900have u found a way to have secrets in nix build yet? :3 06:26:49
@sofiedotcafe:catgirl.cloudSofie 🏳️‍⚧️🐾 (she/her) * K900have u found a way to have secrets in nix builds yet? :3 06:27:02
@webtier:unredacted.orgwebtier

Funny that you're mentioning this because I was running into something like this yesterday, so while migrating I was getting a number of errors which were all pointing to my secrets.nix file not being evaluated properly (whatever the terminology is). Background is that I was handling secrets by first git adding a template secrets.nix, and then doing git update-index --assume-unchanged secrets.nix.

So quite surprisingly, native nix build system handled that well, lix was running into issues though because the changes weren't tracked and was probably seeing a bunch of nulls. Food for thought.

10:58:44
@webtier:unredacted.orgwebtierOfc this is just my dumb way of handling it, I could also use git secrets or something more sophisticated, but wanted to mention this edge-case.11:00:56
@sofiedotcafe:catgirl.cloudSofie 🏳️‍⚧️🐾 (she/her)impure access to /run/secrets would basically be enough11:01:39
@sofiedotcafe:catgirl.cloudSofie 🏳️‍⚧️🐾 (she/her)maybe an option to enable it in pure mode11:01:47
@blokyk:matrix.orgzoë (she/her)
In reply to @sofiedotcafe:catgirl.cloud
K900have u found a way to have secrets in nix build yet? :3
is this about using secrets during the build of a derivation? cause i'd be a very curious how you do that securely with a multi-user setup :3
13:10:59
@blokyk:matrix.orgzoë (she/her)* is this about using secrets during the build of a derivation? cause i'd be very curious how you'd do that securely with a multi-user setup :313:11:13
@blokyk:matrix.orgzoë (she/her)the main problem i can think of is "authenticating" derivations, i.e. making sure the derivation trying to access a secret is you intended to and not some other random derivation that should not be able to read it at all. i can't really see a way of doing that without somehow prompting the user for a password of some kind during build (which would be terrible ux and a bad idea in general), because if you integrate that method of access directly into the derivation's definition, now everyone can read it and get the password for themselves13:18:24
@k900:0upti.meK900The solution for doing that at scale is something like SPIFFE, probably13:19:53
@blokyk:matrix.orgzoë (she/her)
In reply to @k900:0upti.me
The solution for doing that at scale is something like SPIFFE, probably
huh, that's first time of hearing about it so i might have just misread or not understood something, but i'm not sure how that'd help here, since from what i understand it's standard for creation and verification of identities, but i don't see how that squares with the fact that the nix store is public and anyone could read/duplicate the secret/identity if it's in there
13:33:19
@k900:0upti.meK900You design your derivation in a way that the secret is never in the store13:33:53
@k900:0upti.meK900You read the secret from a well-known location during build time13:34:03
@k900:0upti.meK900So the output is in the store, but the secret itself is not13:34:09
@blokyk:matrix.orgzoë (she/her)right, but how do you mediate which builds can access the secret?13:34:31
@k900:0upti.meK900And you use SPIFFE or similar to authenticate to some sort of external secret storage, obtain the secret and inject it into the sandbox13:34:32
@k900:0upti.meK900The coordinator can have policies to decide that13:35:24
@kfears:matrix.orgKFears& 🏳️‍⚧️ (they/them)From what I understand, the idea is that during build time, the daemon delegates the automated auth to the user to fetch the secrets and injects them into temporary build, and purges it after the build so they don't remain in store13:35:40
@k900:0upti.meK900And the builder nodes authenticate the software they're running AND the exact derivation they're building13:35:51
@kfears:matrix.orgKFears& 🏳️‍⚧️ (they/them)That solves the question of "how do I not put secrets into Nix store", but it's not ACLs to Nix store, so the question of "how do I verify my private repo that I need a secret to fetch isn't world-readable in the store"13:36:40
@kfears:matrix.orgKFears& 🏳️‍⚧️ (they/them)* That solves the question of "how do I not put secrets into Nix store", but it's not ACLs to Nix store, so the question of "how do I verify my private repo that I need a secret to fetch isn't world-readable in the store" remains13:36:59
@blokyk:matrix.orgzoë (she/her)
In reply to @k900:0upti.me
And you use SPIFFE or similar to authenticate to some sort of external secret storage, obtain the secret and inject it into the sandbox

okay, but what would create the identity for the derivation?

like the one thing i could see is basically "blessing" certain derivations by signing their final eval'd form (i.e. you build a .drv, let the user then generate a signature for its file or its attrs, and then use that signature as an identity), but that would require an intermediary step /after/ the eval (and before the build)

13:37:25
@kfears:matrix.orgKFears& 🏳️‍⚧️ (they/them)Basically it's fine if repo contents aren't super secret but secrets to fetch them is, from my understanding13:37:33
@k900:0upti.meK900Yes, that's the intent13:37:41
@k900:0upti.meK900There needs to be some trusted evaluator13:37:47
@k900:0upti.meK900That will do the evaluation and build coordination13:37:59
@k900:0upti.meK900And that can provide policy13:38:08
@blokyk:matrix.orgzoë (she/her)
In reply to @kfears:matrix.org
Basically it's fine if repo contents aren't super secret but secrets to fetch them is, from my understanding
right, cause you could always just encrypt the secret repo based on the fetch secret and then you're fine (e.g. like you might do with sops)
13:38:34

Show newer messages


Back to Room ListRoom Version: 10