Add nodejs and yarn

This commit is contained in:
Oliver Davies 2024-08-02 21:27:32 +01:00
parent 4efe94398f
commit 50753a977f
4 changed files with 54 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

3
.gitignore vendored
View file

@ -15,3 +15,6 @@ yarn-error.log*
/.terraform/
/terraform.tfstate
/terraform.tfstate.*
# Nix
/.direnv/

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

23
flake.nix Normal file
View file

@ -0,0 +1,23 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
outputs =
{ nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
inherit (pkgs) mkShell nodejs;
inherit (pkgs.nodePackages) yarn;
in
{
devShells.${system}.default = mkShell {
buildInputs = [
nodejs
yarn
];
};
formatter.${system} = pkgs.nixfmt-rfc-style;
};
}