!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

208 Members
59 Servers

Load older messages


SenderMessageTime
10 Aug 2023
@lily:lily.flowersLily FosterYeah I'm sorry the Nix UX kinda sucks for this :(19:08:09
@countoren:matrix.orgcountorenthe problem with that it exposes the var to any process19:08:18
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
systemctl set-env...
That does similar, but maybe it stores it somewhere else
19:08:23
@lily:lily.flowersLily Foster* Yeah I'm sorry the Nix UX kinda sucks for this :(19:08:29
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
the problem with that it exposes the var to any process
oh
19:08:40
@lily:lily.flowersLily FosterThis setting it in manager conf then19:08:48
@countoren:matrix.orgcountorenmanager conf?19:09:04
@lily:lily.flowersLily Fostersystemd service manager config. So it gets inherited across all services and systemd itself19:09:24
@lily:lily.flowersLily FosterBut that's probably ... fine19:09:32
@countoren:matrix.orgcountorenis'nt it kinda defeat the purpose ?19:09:56
@countoren:matrix.orgcountorenwell I guess it is better then being in nix store...19:10:17
@countoren:matrix.orgcountorenActually should'nt the rust just read npmrc if exists?19:11:15
@lily:lily.flowersLily FosterNot necessarily. Unpriveleged users can't read the environment of a privileged process (which all system services probably are. Or at least not running as the interactive user I mean) and it's really easy for stuff that gets into the store to accidentally make it other places (and store is world-readable by default)19:11:30
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
Actually should'nt the rust just read npmrc if exists?
It won't exist in the nix sandbox and I'd have to add npmrc parsing code for that 😅
19:11:56
@lily:lily.flowersLily Foster* It won't exist in the nix sandbox and I'd have to add npmrc parsing code for that anyway 😅19:12:13
@lily:lily.flowersLily Foster* Not necessarily. Unprivileged users can't read the environment of a privileged process (which all system services probably are. Or at least not running as the interactive user I mean) and it's really easy for stuff that gets into the store to accidentally make it other places (and store is world-readable by default)19:12:24
@countoren:matrix.orgcountorenWell I guess user can just writeShellScript wrapping the nix build itself exporting the env var reading npmrc19:13:35
@lily:lily.flowersLily Foster If you really want it in the derivation and don't mind it being in the store, you'll be able to set postPatch = "export NPM_TOKENS=..." with it how it is 19:14:07
@lily:lily.flowersLily FosterAs well19:14:12
@lily:lily.flowersLily FosterSince it doesn't care where the env var comes from, it just cares that it exists19:14:25
@countoren:matrix.orgcountorenYes but the script way it wont be on store19:14:33
@lily:lily.flowersLily Foster (And postPatch is one of the hooks that gets propagated to the fetcher) 19:14:48
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
Yes but the script way it wont be on store
Correct. I'm just saying you have another option if you don't want to do the builder environment thing and don't mind it going to the store for simpler threat models (e.g. testing keys)
19:15:29
@lily:lily.flowersLily FosterScript should be fine to avoid leaking secrets to nix store19:15:54
@countoren:matrix.orgcountorenMake sense19:15:52
@countoren:matrix.orgcountorenwe can add util for that maybe.19:16:26
@countoren:matrix.orgcountorenkinda meta tho :)19:16:31
@countoren:matrix.orgcountoren Thank very much Lily Foster , if you get a chance to let me know when you got the PR in. I will update my flake. 19:18:32
@lily:lily.flowersLily FosterWill do! Thanks for helping test and I'm glad you got your thing working :)19:19:15
13 Aug 2023
@10leej:matrix.org@10leej:matrix.org joined the room.01:27:15

Show newer messages


Back to Room ListRoom Version: 6