Skip to content

Instantly share code, notes, and snippets.

@binaryphile
Created January 24, 2025 19:50
Show Gist options
  • Save binaryphile/80e0cb371f47382c5f9c9bb93ef87077 to your computer and use it in GitHub Desktop.
Save binaryphile/80e0cb371f47382c5f9c9bb93ef87077 to your computer and use it in GitHub Desktop.
Node development shell flake
{
description = "URMA Nix development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true; # Allow unfree packages like vscode
};
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
git
nodejs
nodePackages.npm
vscode
];
shellHook = ''
echo "Welcome to the development shell!"
echo "VSCode: Run 'code .' to launch"
echo "Node.js: $(node --version)"
echo "NPM: $(npm --version)"
'';
};
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment