!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

203 Members
58 Servers

Load older messages


SenderMessageTime
15 Dec 2023
@lily:lily.flowersLily Foster * (like different than yours with the same derivation, btw)02:21:30
@lily:lily.flowersLily Foster oh, the /var/empty is the home dir in /etc/passwd for the nixbld users (which I'm using auto-allocate-uids so i don't use) 02:24:30
@lily:lily.flowersLily Foster * oh, the /var/empty is the home dir in /etc/passwd for the nixbld users (which I'm using auto-allocate-uids so i don't have) 02:24:34
@lily:lily.flowersLily Foster this means for some reason the HOME var is gone by that point? 02:34:10
@lily:lily.flowersLily Foster for libuv to fall back to getpwuid_r for determining home dir 02:34:24
@lily:lily.flowersLily Fosterah. hugo strips the var before execing stuff...02:36:12
@lily:lily.flowersLily Fosterif it's not explicitly specified in config.toml02:36:37
@lily:lily.flowersLily Fosternaturally02:36:39
@lily:lily.flowersLily Foster so back to why buildNpmPackage works out of the box with this. it looks like nix sets up a /etc/passwd in the sandbox when you use one, and because npmHooks.npmConfigHook sets up npm with directories to do stuff in, npx will find the npm config via home dir in /etc/passwd and then know where to go from there for cache dir. but given this derivation is intended to run with no sandbox, the reliance on /etc/passwd obviously no longer holds 02:41:46
@lily:lily.flowersLily Foster as for what to do about it if you don't want to use a builder, you can probably just set osEnv = ['HOME'] in security.exec in your config.toml 02:43:43
@lily:lily.flowersLily Foster * as for what to do about it if you don't want to use a builder, you can probably just set osEnv = ['HOME', 'PATH'] in security.exec in your config.toml 02:45:16
@lily:lily.flowersLily Foster yeah that seems to work in some testing with your derivation above avocadoom 02:45:32
@whentze:matrix.orgWanja Hentze oh no is this $HOME vs. getpwuid again 02:47:18
@lily:lily.flowersLily Foster
In reply to @whentze:matrix.org
oh no is this $HOME vs. getpwuid again
with a hugo curveball since it allows you to execute a program that could still read arbitrary files (including /proc/*/environ for current uid!) but scrubs the environment of even useful variables by default for "security"
02:48:19
@raitobezarius:matrix.orgraitobezariusvery secure02:48:54
@avocadoom:avocadoom.deavocadoom Lily Foster: thx for researching, will try that out later ♥️ 02:50:16
@julia:the-apothecary.club@julia:the-apothecary.club joined the room.12:48:11
@avocadoom:avocadoom.deavocadoomit worked, thx for all the help <313:12:57
@avocadoom:avocadoom.deavocadoomis there a good place to maybe document this for people stumbling upon the same problem?13:34:52
@avocadoom:avocadoom.deavocadoommaybe nix.dev or something like that?13:35:05
@lily:lily.flowersLily Fosterhugo docs probably13:35:10
@lily:lily.flowersLily Fosterit's not exactly a nix problem that hugo needs a working HOME but their recommended security policies for babel don't include that13:35:43
@lily:lily.flowersLily Fosterunless i just missed it when skimming hugo docs13:35:50
@lily:lily.flowersLily Foster* it's not exactly a nix problem that babel needs a working HOME but the hugo recommended security policies for babel don't include that13:36:21
@avocadoom:avocadoom.deavocadoomguess I'll just open an issue and see where it goes then13:43:16
@avocadoom:avocadoom.deavocadoommaybe this is an oversight and they can make it a default or something like that13:43:28
@shine:proqqul.netTaeer Bar-Yam joined the room.14:54:36
18 Dec 2023
@platonic.mason:matrix.orgMason Mackaman joined the room.08:51:00
@platonic.mason:matrix.orgMason Mackamanwhat is the current best tools for the job in this department? npmlock2nix was my go to a year ago, but now it's not working for me. I'm trying to rangle dream2nix but I'm not liking the UX so far, and certain things are just now working such that I've had to patch the code for my stuff to build. so yeah, I'm wondering if there have been any other tools introduced since last I have needed to tackle this horrible problem.08:53:34
@platonic.mason:matrix.orgMason Mackaman * what is the current best tools for the job in this department? npmlock2nix was my go to a year ago, but now it's not working for me. I'm trying to rangle dream2nix but I'm not liking the UX so far, and certain things are just not working such that I've had to patch the code for my stuff to build. so yeah, I'm wondering if there have been any other tools introduced since last I have needed to tackle this horrible problem.08:53:55

Show newer messages


Back to Room ListRoom Version: 6