Add flake.nix for nodejs

This commit is contained in:
Oliver Davies 2025-01-08 06:00:00 +00:00
parent 989b943a75
commit 91ac36c1d8
3 changed files with 49 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake .

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1736012469,
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

21
flake.nix Normal file
View file

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