!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

210 Members
61 Servers

Load older messages


SenderMessageTime
9 Aug 2023
@countoren:matrix.orgcountorenas ref23:48:52
@countoren:matrix.orgcountoren * as absulte pat23:49:02
@lily:lily.flowersLily FosterFor nixpkgs, yeah that's probably easiest23:49:08
@countoren:matrix.orgcountoren * as absolute pat23:49:14
@lily:lily.flowersLily FosterI'm just saying to pass in the privilege token you'll need to get it into the build environment a bit awkwardly (unfortunately)23:49:25
@countoren:matrix.orgcountorenits been a while since I worked on the actual nixpkgs. so it clean copy23:49:52
@countoren:matrix.orgcountorenbtw another way if you a branch or fork i can point the flake directly to it23:50:52
@lily:lily.flowersLily Foster Oh yeah, sure! github:lilyinstarlight/nixpkgs/feature/prefetch-npm-deps-tokens 23:51:40
@countoren:matrix.orgcountorenthe magic of flake... 23:54:02
@countoren:matrix.orgcountorenit must be on daemon? there is no way to specify it on the project's flake itself? 23:59:05
10 Aug 2023
@lily:lily.flowersLily FosterTokens are secrets, so it's not something we usually do in nixpkgs. Afaik what we usually do when fetcher info needs to be propagated to the builder we just let it impurely inherit env vars from the builder (which is admittedly very hacky and unintuitive and annoying, so if anyone knows another way fetcher secrets are propagated in nixpkgs I would be open to implementing an alternative as well)00:05:18
@countoren:matrix.orgcountorenI w00:06:11
@countoren:matrix.orgcountorenyes it make sense but It might be fine to have a quick way if someone want to define them the uncleaner way they can with a warning maybe 00:08:11
@countoren:matrix.orgcountorenwell I guess if you really want you can always hack a quick writeshellscript to change you secrets on the service00:11:12
@countoren:matrix.orgcountorenbut for beginners it might not be that straightforward 00:11:49
@countoren:matrix.orgcountoren Lily Foster: so /etc/systemd/system/nix-daemon.service.d/overrides.conf is a symlink to the store. I could overwrite with my own copy it and add the env var put is it correct? 00:22:02
@countoren:matrix.orgcountoren * Lily Foster: so /etc/systemd/system/nix-daemon.service.d/overrides.conf is a symlink to the store. I could overwrite with my own copy it and add the env var, but is it correct? 00:22:13
@countoren:matrix.orgcountoren I guess ill go with systemctl set-environment 00:32:37
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
Lily Foster: so /etc/systemd/system/nix-daemon.service.d/overrides.conf is a symlink to the store. I could overwrite with my own copy it and add the env var, but is it correct?
You can also add a new file in that dir
00:35:57
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
I guess ill go with systemctl set-environment
But that works too :)
00:36:02
@countoren:matrix.orgcountoren

so given this npmrc for my token now:

@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=11111111111111111111111111111111111111111111111
00:36:45
@lily:lily.flowersLily Foster
In reply to @me:indeednotjames.com
alright, thanks! :)
Yep, it looks like nodejs finally released the sources a couple hours ago and marsam has already opened https://github.com/NixOS/nixpkgs/pull/248230
00:36:50
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org

so given this npmrc for my token now:

@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=11111111111111111111111111111111111111111111111
Yeah that would become NIX_NPM_TOKENS={"npm.fontawesome.com":"111111111111111111111"} in the environment for the fetcher
00:37:59
@countoren:matrix.orgcountoren
In reply to @lily:lily.flowers
Yeah that would become NIX_NPM_TOKENS={"npm.fontawesome.com":"111111111111111111111"} in the environment for the fetcher
thank you ill do it right, didnt know about the new file might try it too
00:39:27
@countoren:matrix.orgcountorenchanged and restarted the deamon. do you know a way to check if it got it?00:45:31
@lily:lily.flowersLily FosterHmmm, I'm not sure other than saying to try a build00:46:03
@countoren:matrix.orgcountorenok00:46:16
@lily:lily.flowersLily Foster Maybe you could add a postPatch = "echo $NIX_NPM_TOKENS" to your derivation and see if it's in the output 00:46:47
@countoren:matrix.orgcountorentrying to build00:47:22
@countoren:matrix.orgcountorenwith your branch00:47:26

Show newer messages


Back to Room ListRoom Version: 6