commit b280d54f77af1ff6c9171e41009b43a5f0a35d71 Author: Oliver Davies Date: Fri Mar 29 00:50:46 2024 +0000 Add Nix Flake with nodejs and just diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..a5dbbcb --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake . diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..eecb9ae --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b4edc66 --- /dev/null +++ b/flake.nix @@ -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; + }; +}