Skip to content

unpinned nixpkgs-unstable channel new revision downloads although I pinned nixpkgs in my shell.nix file #1401

@tnielens

Description

@tnielens

I'm new to nix and am interested in it for portable dev envs.

I started with the detsys nix installer and am running macos 15.1.1. I'm working a lot in large repositories and found NixOS/nix#6530 . This performance issue makes flakes unsuable for me for devenvs source controlled together with my work projects.

I fell back to classic shell.nix. Downloading newer versions of nixpkgs is very slow (around ~5minutes, a macos issue?) so I'm pinning the nixpkgs revision in our shell.nix. Despite that, new revisions from the channel nixpkgs-unstable were downloaded regularly, making for a poor experience. I resolved the issue by removing the extra-nix-path section in nix.conf, more by trial and error than understanding that configuration setting.

Not downloading latest revisions of nixpkgs-unstable in pinned shell.nix by default would make for a better experience.

shell.nix

let
  # release 24.11, pinned
  nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/archive/9b6cdf829fdef63efed466cf537c838dc685da41.tar.gz";
  pkgs = import nixpkgs { config = {}; overlays = []; };
in

pkgs.mkShellNoCC {
  packages = with pkgs; [
    yq-go
    kubernetes-helm
    bash
  ];
}

Problem reproduced at 2025-01-29T21:00, with this relevant log section for the command nix-shell --debug my-project/shell.nix

fetching flake search path element 'nixpkgs''
using cache entry 'file:{"name":"flake-registry.json","store":"/nix/store","url":"https://channels.nixos.org/flake-registry.json"}' -> '{"etag":"W/\"1d6d5f942245b7e17320219962c68f04949edf88d99fc58a5a3b076165562d30\"","storePath":"245nl9ad8inws9pi63nj5pqjdgsb4b5r-flake-registry.json","url":"https://channels.nixos.org/flake-registry.json"}'
performing daemon worker op: 11
performing daemon worker op: 1
using cache entry 'file:{"name":"flake-registry.json","store":"/nix/store","url":"https://channels.nixos.org/flake-registry.json"}' -> '{"etag":"W/\"1d6d5f942245b7e17320219962c68f04949edf88d99fc58a5a3b076165562d30\"","url":"https://channels.nixos.org/flake-registry.json"}', '/nix/store/245nl9ad8inws9pi63nj5pqjdgsb4b5r-flake-registry.json'
downloading 'https://channels.nixos.org/flake-registry.json'...
starting download of https://channels.nixos.org/flake-registry.json
finished download of 'https://channels.nixos.org/flake-registry.json'; curl status = 0, HTTP status = 304, body = 0 bytes, duration = 0.22 s
performing daemon worker op: 11
performing daemon worker op: 12
looked up 'flake:nixpkgs' -> 'github:NixOS/nixpkgs/nixpkgs-unstable'
using cache entry 'file:{"name":"source","store":"/nix/store","url":"https://api.github.com/repos/NixOS/nixpkgs/commits/nixpkgs-unstable"}' -> '{"etag":"W/\"541151bfd6bb6c5c10833c5feac86a53820aee7add420fcc9dec79d602449708\"","storePath":"yc8v2zlsdgim5dnyi8mrn763hjdriwr8-source","url":"https://api.github.com/repos/NixOS/nixpkgs/commits/nixpkgs-unstable"}'
performing daemon worker op: 11
performing daemon worker op: 1
using cache entry 'file:{"name":"source","store":"/nix/store","url":"https://api.github.com/repos/NixOS/nixpkgs/commits/nixpkgs-unstable"}' -> '{"etag":"W/\"541151bfd6bb6c5c10833c5feac86a53820aee7add420fcc9dec79d602449708\"","url":"https://api.github.com/repos/NixOS/nixpkgs/commits/nixpkgs-unstable"}', '/nix/store/yc8v2zlsdgim5dnyi8mrn763hjdriwr8-source'
downloading 'https://api.github.com/repos/NixOS/nixpkgs/commits/nixpkgs-unstable'...
starting download of https://api.github.com/repos/NixOS/nixpkgs/commits/nixpkgs-unstable
finished download of 'https://api.github.com/repos/NixOS/nixpkgs/commits/nixpkgs-unstable'; curl status = 0, HTTP status = 200, body = 2214 bytes, duration = 0.28 s
performing daemon worker op: 39
locking path '/nix/store/428f3qq5f9ggcz2rgil2qy08ignlbkl2-source'
lock acquired on '/nix/store/428f3qq5f9ggcz2rgil2qy08ignlbkl2-source.lock'
lock released on '/nix/store/428f3qq5f9ggcz2rgil2qy08ignlbkl2-source.lock'
HEAD revision for 'github:NixOS/nixpkgs/nixpkgs-unstable' is 9a5db3142ce450045840cc8d832b13b8a2018e0c
did not find cache entry for 'gitRevToTreeHash:{"rev":"9a5db3142ce450045840cc8d832b13b8a2018e0c"}'
unpacking 'github:NixOS/nixpkgs/9a5db3142ce450045840cc8d832b13b8a2018e0c' into the Git cache...
downloading 'https://github.com/NixOS/nixpkgs/archive/9a5db3142ce450045840cc8d832b13b8a2018e0c.tar.gz'...
starting download of https://github.com/NixOS/nixpkgs/archive/9a5db3142ce450045840cc8d832b13b8a2018e0c.tar.gz```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions