chore: flake.nix setup

This commit is contained in:
Guz
2024-09-16 09:12:40 -03:00
commit dab37b8e8c
2 changed files with 60 additions and 0 deletions

33
flake.nix Normal file
View File

@@ -0,0 +1,33 @@
{
description = "My development environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
}: let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f:
nixpkgs.lib.genAttrs systems (system: let
pkgs = import nixpkgs {inherit system;};
in
f system pkgs);
in {
devShells = forAllSystems (system: pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
eslint
nodejs_22
nodePackages_latest.prettier
bun
];
};
});
};
}