commit dab37b8e8cf68019e66202d3f06bdc3c3a6776bf Author: Gustavo L de Mello (Guz) Date: Mon Sep 16 09:12:40 2024 -0300 chore: flake.nix setup diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..34dde40 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1726243404, + "narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-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 0000000..5be7a89 --- /dev/null +++ b/flake.nix @@ -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 + ]; + }; + }); + }; +}