diff --git a/.envrc b/.envrc new file mode 100644 index 000000000..b85b26d14 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +has nix && use flake diff --git a/.gitignore b/.gitignore index 1db281129..9697e9457 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,7 @@ Thumbs.db /openapitools.json -.nx/cache \ No newline at end of file +.nx/cache + +# Direnv +.direnv \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..1d43b8303 --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1727863144, + "narHash": "sha256-E9uNBPoac2pZ62a3k482RnMpDM9aQAG5PnFKi36cTQE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1ef7ab47629547cfdaeddee7b8cde510bae78d10", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..63f1636c1 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "OpenAPI generator CLI nix flake"; + + inputs.nixpkgs.url = "github:nixos/nixpkgs"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells.default = pkgs.mkShell + { + buildInputs = with pkgs;[ + # These dependencies match the github workflows + yarn + nodejs_18 + ]; + }; + } + ); +} +