Node.js: Difference between revisions

Arcstur (talk | contribs)
Packaging: example on how to package a npm package with flakes
Makefu (talk | contribs)
m update link to homepage-dashboard package
 
(One intermediate revision by one other user not shown)
Line 261: Line 261:
</syntaxhighlight>You can take a look at what fonts are available in the Nix <code>google-fonts</code> package by calling:<syntaxhighlight lang="shell">
</syntaxhighlight>You can take a look at what fonts are available in the Nix <code>google-fonts</code> package by calling:<syntaxhighlight lang="shell">
ls -ahl $(nix build --no-link --print-out-paths nixpkgs#google-fonts)/share/fonts/truetype/
ls -ahl $(nix build --no-link --print-out-paths nixpkgs#google-fonts)/share/fonts/truetype/
</syntaxhighlight>Take a look at https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/homepage-dashboard/default.nix for further workarounds for Nextjs in Nix.
</syntaxhighlight>Take a look at [https://github.com/NixOS/nixpkgs/blob/8358fd43a66594d8b3445d87006185fa76d4be6e/pkgs/by-name/ho/homepage-dashboard/package.nix homepage-dashboard package in nixpkgs] for further workarounds for Nextjs in Nix.


== Tips and tricks ==
== Tips and tricks ==
=== Example nix flake shell for Node.js development ===
=== Example nix flake shell for Node.js development ===
[[Flake]] example:
[[Flake]] example: (Note: the `${&amp;lt;nixpkgs&amp;gt;}` needs to be replaced by `${<nixpkgs>}`
{{file|flake.nix|nix|
{{file|flake.nix|nix|
<nowiki>
<nowiki>