diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..606c47291 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1733935885, + "narHash": "sha256-xyiHLs6KJ1fxeGmcCxKjJE4yJknVJxbC8Y/ZRYyC8WE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5a48e3c2e435e95103d56590188cfed7b70e108c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-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 000000000..c46fc2a8e --- /dev/null +++ b/flake.nix @@ -0,0 +1,31 @@ +{ + description = "Example JavaScript development environment for Zero to Nix"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + }; + + outputs = { self, nixpkgs }: + let + allSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in + { + devShells = forAllSystems ({ pkgs }: { + default = pkgs.mkShell { + packages = with pkgs; [ + nodejs_23 + hugo + ]; + }; + }); + }; +}