ISO with Pinned Packages

I can create a binary with pinned packages and deploy it successfully. I love create custom ISOs also.

However, am unsure how to create custom ISO with pinned packages… I am sure it’s a basic misunderstanding I have (or don’t have).

  nixpkgs = builtins.fetchTarball {
    url = "";
    sha256 = "1liw3glyv1cx0bxgxnq2yjp0ismg0np2ycg72rqghv75qb73zf9h";

  pkgs = import "${nixpkgs}/nixos" { config = {}; };



{config, pkgs, ...}:

  imports = [

The following works:

nixos-generate -f iso -c iso.nix

but it doesn’t seem to use the pinned packages.

1 Like

The <nixpkgs/.../...> expression is the issue here. This will look up “nixpkgs” in the NIX_PATH environment variable, which is the impurity you’re seeing.


Ahhh, now I see, I will give it a go. Thanks!