How can I point my nix installation (on macOS) to a specific version of nixpkgs? I'm trying to ensure that my home and office computers always use the same versions of all packages.
1 Answer
You can pin the nixpkgs version like shown in the wiki
import (builtins.fetchTarball { # Descriptive name to make the store path easier to identify name = "nixos-unstable-2018-09-12"; # Commit hash for nixos-unstable as of 2018-09-12 url = "https://github.com/nixos/nixpkgs/archive/ca2ba44cab47767c8127d1c8633e2b581644eb8f.tar.gz"; # Hash obtained using `nix-prefetch-url --unpack <url>` sha256 = "1jg7g6cfpw8qvma0y19kwyp549k1qyf11a5sg6hvn6awvmkny47v"; }) {}