mirror of
https://github.com/sbrow/nix.git
synced 2026-02-27 21:31:45 -05:00
feat: Added basic Node.js template.
This commit is contained in:
1
templates/nodejs/.envrc
Normal file
1
templates/nodejs/.envrc
Normal file
@@ -0,0 +1 @@
|
||||
use flake
|
||||
2
templates/nodejs/.gitignore
vendored
Normal file
2
templates/nodejs/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.direnv
|
||||
node_modules
|
||||
58
templates/nodejs/flake.lock
generated
Normal file
58
templates/nodejs/flake.lock
generated
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1685620773,
|
||||
"narHash": "sha256-iQ+LmporQNdLz8uMJdP62TaAWeLUwl43/MYUBtWqulM=",
|
||||
"path": "/nix/store/ipbqg8zvymxjlw96pl2mvgpigzc3wm7p-source",
|
||||
"rev": "f0ba8235153dd2e25cf06cbf70d43efdd4443592",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
22
templates/nodejs/flake.nix
Normal file
22
templates/nodejs/flake.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
};
|
||||
|
||||
outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
yarn
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
6
templates/nodejs/package.json
Normal file
6
templates/nodejs/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "node-package",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"private": true
|
||||
}
|
||||
Reference in New Issue
Block a user