> Nix Development Environments

Reproducible development environments with Nix flakes and nix-shell.

fetch
$curl "https://skillshub.wtf/skillshub-team/catalog-batch5/nix-development?format=md"
SKILL.mdNix Development Environments

Nix Dev Environments

flake.nix

{
  inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; };
  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let pkgs = nixpkgs.legacyPackages.${system}; in {
        devShells.default = pkgs.mkShell {
          buildInputs = with pkgs; [ nodejs_20 python3 rustc cargo postgresql redis ];
          shellHook = "echo 'Dev environment ready!'";
        };
      });
}

Enter: nix develop (or direnv for auto-activation)

shell.nix (non-flake)

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell { buildInputs = [ pkgs.nodejs pkgs.yarn ]; }

Key Benefits

  • Reproducible: same packages everywhere (dev, CI, prod)
  • Isolated: doesn't pollute global system
  • Declarative: version-controlled dev dependencies
  • Cross-platform: Linux and macOS

┌ stats

installs/wk0
░░░░░░░░░░
first seenMar 18, 2026
└────────────

┌ tags

└────────────