Package Manager OS Language

Nix Get Nix

Reproducible builds, declarative environments, one toolchain for everything.

terminal
$ curl -sSf -L https://getnix.io/install | sh -s -- install

getnix.io/install redirects to the Determinate Nix Installer

macOS macOS Linux Linux WSL Docker Docker

One file,
all environments

One use case is to run nix develop to get an identical dev shell with every tool your project needs, on any machine.

01

Declarative

Pin exact versions in code

02

Reproducible

Same inputs, same output

03

Universal

Linux, macOS, WSL, CI

flake.nix terminal
# flake.nix
{
  description = "Go Dev Environment";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

  outputs = { nixpkgs, ... }:
  let
    systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
    forAllSystems = nixpkgs.lib.genAttrs systems;
  in {
    devShells = forAllSystems (system:
    let
      pkgs = nixpkgs.legacyPackages.${system};
    in {
      default = pkgs.mkShell {
        packages = with pkgs; [ go gopls golangci-lint delve ];
      };
    });
  };
}
terminal
$ nix develop

(nix) $ go version
go version go1.26.1 linux/amd64

(nix) $ which gopls dlv golangci-lint
/nix/store/…-gopls/bin/gopls
/nix/store/…-delve/bin/dlv
/nix/store/…-golangci-lint/bin/golangci-lint

Ready to try Nix?

Install in one command and follow a guide to build something real.