Last active
February 21, 2024 23:11
-
-
Save dmmulroy/413aade162bd7732ddf209239fbf6e7c to your computer and use it in GitHub Desktop.
Nix flake for a simple Node and TypeScript DevShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Nix flake for a simple Node and TypeScript DevShell"; | |
inputs = { | |
flake-parts.url = "github:hercules-ci/flake-parts"; | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
}; | |
outputs = inputs @ {flake-parts, ...}: | |
flake-parts.lib.mkFlake {inherit inputs;} { | |
imports = [inputs.flake-parts.flakeModules.easyOverlay]; | |
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"]; | |
perSystem = { | |
config, | |
self', | |
inputs', | |
pkgs, | |
system, | |
final, | |
... | |
}: { | |
formatter = pkgs.alejandra; | |
devShells = { | |
default = pkgs.mkShell { | |
buildInputs = with pkgs; [ | |
nodejs_18 | |
typescript | |
eslint_d | |
prettierd | |
corepack_18 | |
]; | |
}; | |
}; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment