Skip to content

Instantly share code, notes, and snippets.

@dmmulroy
Last active February 21, 2024 23:11
Show Gist options
  • Save dmmulroy/413aade162bd7732ddf209239fbf6e7c to your computer and use it in GitHub Desktop.
Save dmmulroy/413aade162bd7732ddf209239fbf6e7c to your computer and use it in GitHub Desktop.
Nix flake for a simple Node and TypeScript DevShell
{
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