Add Nix Flake with nodejs and just

This commit is contained in:
Oliver Davies 2024-03-29 00:50:46 +00:00
commit b280d54f77
3 changed files with 47 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": 1711523803,
"narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2726f127c15a4cc9810843b96cad73c7eb39e443",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

19
flake.nix Normal file
View file

@ -0,0 +1,19 @@
{
description = "An example application that uses Stimulus with esbuild.";
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; [ just nodejs simple-http-server ];
};
formatter.${system} = pkgs.nixfmt;
};
}