!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

210 Members
61 Servers

Load older messages


SenderMessageTime
24 Aug 2023
@lily:lily.flowersLily Foster
In reply to @robert:funklause.de
Lily Foster: Could you add details to https://github.com/LibreScore/dl-librescore/pull/32#issuecomment-1692558038 ? The Nixpkgs manual has none
Yeah I'll try to chime in tomorrow, if that's okay. Not sure I have the energy tonight
23:55:38
@robert:funklause.dedotlambdaNo worries23:56:36
@robert:funklause.dedotlambdaThough if you have a link that would be handy23:56:57
@lily:lily.flowersLily FosterThere's not stuff in the manual exactly (because I'm deliquent...), but I can explain what's up with it and what might help us out23:58:03
@lily:lily.flowersLily FosterIn the thread23:58:12
27 Aug 2023
@robert:funklause.dedotlambda Should we add --build-from-source to npmInstallFlags by default?
See https://github.com/prebuild/node-gyp-build/blob/master/README.md#usage
Though because of https://github.com/prebuild/node-gyp-build/blob/master/bin.js#L11 the prebuild is used anyway if building from source doesn't work.
02:26:56
@robert:funklause.dedotlambda Maybe we should make node-gyp-build an alias for node-gyp build unless some flag is set. 02:28:12
@lily:lily.flowersLily Foster
In reply to @robert:funklause.de
Maybe we should make node-gyp-build an alias for node-gyp build unless some flag is set.
Yeah tbh I was considering this option more
13:20:36
@lily:lily.flowersLily Foster
In reply to @robert:funklause.de
Lily Foster: Could you add details to https://github.com/LibreScore/dl-librescore/pull/32#issuecomment-1692558038 ? The Nixpkgs manual has none
Heck. I forgot about this. I'll try to do that today
13:21:20
29 Aug 2023
@aktaboot:tchncs.deaktaboot left the room.05:18:21
30 Aug 2023
@xigen38112:matrix.orgxigen38112 joined the room.09:10:55
31 Aug 2023
@adrianhesketh:matrix.orgAdrian Hesketh joined the room.12:09:56
4 Sep 2023
@nord:one.ems.host@nord:one.ems.host left the room.04:01:44
8 Sep 2023
@ulli:hrnz.lihrnz left the room.20:42:52
9 Sep 2023
@lily:lily.flowersLily Foster
In reply to @janne.hess:helsinki-systems.de
This causes (buildNpmPackage.override { nodejs = nodejs_14; }) to fail horribly
Hey I think https://github.com/NixOS/nixpkgs/pull/253181 fixed your problem. Do you want to test it?
15:59:44
10 Sep 2023
@janne.hess:helsinki-systems.deJanne Heß
In reply to @lily:lily.flowers
Hey I think https://github.com/NixOS/nixpkgs/pull/253181 fixed your problem. Do you want to test it?
I will ask the coworker who had this issue :O
09:09:17
@shaniag:matrix.orgshaniag joined the room.16:59:47
@shaniag:matrix.orgshaniag Okay Lily Foster so my main goal is to host my discord.js 14 bot on a nixos server 17:00:09
@shaniag:matrix.orgshaniag to start the bot I use the node index.js command 17:00:19
@shaniag:matrix.orgshaniag I use that buildNpmPackagewith dontNpmBuild to just get the codebase for the bot on the server 17:00:45
@shaniag:matrix.orgshaniagand then I want to start the bot there with systemd service usng that flake as working directory17:01:02
@shaniag:matrix.orgshaniag I think this all works out, but the problem now is in my local dev envrionment I have the file config.json where my secret bot token is, and I somehow need to also have that on the directory on the server. But since that is in .gitignore because not everyone shuold see it I do not have that necessary file on the server :( 17:02:00
@shaniag:matrix.orgshaniag * and then I want to start the bot there with systemd service usng that flake input as working directory17:02:39
@lily:lily.flowersLily Foster
In reply to @shaniag:matrix.org
to start the bot I use the node index.js command
(I'm not sure how your package.json is structured, but you might find it easier to set a "bin": "index.js" entry in it and if you need auxiliary files then including "directories": [ "..." ] and/or "files": [ "..." ] might be easier, since then buildNpmPackage's default installPhase would handle installing all of the files and providing a nice $pkg/bin/botname executable. It won't help with stuff like secret management, but I just figured I'd mention it)
17:04:17
@lily:lily.flowersLily Foster
In reply to @shaniag:matrix.org
I think this all works out, but the problem now is in my local dev envrionment I have the file config.json where my secret bot token is, and I somehow need to also have that on the directory on the server. But since that is in .gitignore because not everyone shuold see it I do not have that necessary file on the server :(
Can you pull it from environment variables? Systemd has a EnvironmentFile option you can use to load secret environment variables from something you place on the server. Alternatively it also has a LoadCredential mechanism you can look into. Not sure this part specifically has to do with the npm tooling though NixOS secrets management options are still not mature/first-class supported things
17:05:52
@lily:lily.flowersLily Foster(If you want to manage the secrets declaratively there's agenix and sops-nix too. But yeah that's not really a node.js related thing)17:06:53
@lily:lily.flowersLily Foster (I mostly mentioned this channel since I saw you had a custom installPhase and thought you might have been having buildNpmPackage problems with the default install phase πŸ˜…) 17:08:19
@shaniag:matrix.orgshaniag
In reply to @lily:lily.flowers
(I mostly mentioned this channel since I saw you had a custom installPhase and thought you might have been having buildNpmPackage problems with the default install phase πŸ˜…)
yes i am sorry, you fixed that issue in like one minute I guess. Now the main issue is the secret management
17:09:34
@shaniag:matrix.orgshaniagshould I post my question in private chat with you or where?17:09:42
@lily:lily.flowersLily Foster Probably back to #nix:nixos.org , more people can help there and I'm technically on mobile (I just have buildNpmPackage set as a matrix keyword so you pinged me with that first message and I thought I'd weigh in) 17:10:37

Show newer messages


Back to Room ListRoom Version: 6