chore: add flake.nix

add instructions for nix
This commit is contained in:
taskylizard 2024-09-18 11:35:07 +00:00
parent 5536f0699a
commit d996c2a1a1
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
6 changed files with 80 additions and 12 deletions

26
flake.nix Normal file
View file

@ -0,0 +1,26 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = {nixpkgs, ...}: let
forAllSystems = f:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: let
pkgs = nixpkgs.legacyPackages.${system};
in
f pkgs);
in {
packages = forAllSystems (pkgs: {
formatter = pkgs.alejandra;
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs
pnpm
git
];
};
});
};
}