diff --git a/.cspell.json b/.cspell.json index 30b77e051..befdb1429 100644 --- a/.cspell.json +++ b/.cspell.json @@ -112,6 +112,8 @@ "*.excalidraw", "*.svg", "Makefile", + "flake.nix", + "flake.lock", // TODO: remove the following "CHANGELOG.md", ".woodpecker/", diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..1be1eab39 --- /dev/null +++ b/flake.lock @@ -0,0 +1,76 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "id": "flake-utils", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1715614915, + "narHash": "sha256-O6sqpppOtlfgx6PK5bnkAvBudK1rpjP7ig0dj7HvIl0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d2ed14aa4f912254c578fc19b842f2910c9146be", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "systems": "systems_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "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..233229bbb --- /dev/null +++ b/flake.nix @@ -0,0 +1,41 @@ +{ + # Override nixpkgs to use the latest set of node packages + inputs.nixpkgs.url = "github:NixOS/nixpkgs/master"; + inputs.systems.url = "github:nix-systems/default"; + + outputs = + { + self, + nixpkgs, + flake-utils, + systems, + }: + flake-utils.lib.eachSystem (import systems) ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + # generic + gnumake + gnutar + + # frontend + nodejs + nodePackages.pnpm + nodePackages.typescript + nodePackages.typescript-language-server + + # backend + go + gofumpt + golangci-lint + go-mockery + protobuf + ]; + }; + } + ); +}