build: resolve nixpkgs via the flake registry, not a pinned nixos-unstable ref
User has nix.registry.nixpkgs.flake = inputs.nixpkgs; in their NixOS configuration.nix (confirmed). Changing nixpkgs.url from the pinned github:nixos/nixpkgs/nixos-unstable ref to the bare registry name "nixpkgs" makes this flakes nixpkgs input resolve to their exact system nixpkgs (instead of independently-floating nixos-unstable HEAD) on nix flake lock/update - which matters for anything built here that needs to match the actual running kernel (linuxPackages.v4l2loopback, docs/setup-linux.md step 7), not just coincidentally close to it. Not a live-follow on every build - nix flake update nixpkgs re-resolves and re-locks it whenever the systems own nixpkgs pin changes, same update cadence as any other flake input. No flake.lock is committed yet (nix is not available in this sandbox to generate one), so there is nothing stale to reconcile - the next nix develop/nix run on the users machine locks fresh against this new input URL. Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
This commit is contained in:
1 parent
6b850ef958
commit
141d815673
1 file changed
+10
-1
@@ -12,7 +12,16 @@
|
||||
'';
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
# Bare registry name, not a pinned github: ref: on a NixOS system with
|
||||
# `nix.registry.nixpkgs.flake = inputs.nixpkgs;` in configuration.nix (the
|
||||
# common flake-based-NixOS pattern), this resolves to that system's exact
|
||||
# nixpkgs input instead of nixos-unstable HEAD - so anything built here
|
||||
# that needs to match the running kernel (e.g. linuxPackages.v4l2loopback
|
||||
# for docs/setup-linux.md step 7) matches it for real, not by coincidence.
|
||||
# `nix flake update nixpkgs` re-resolves this (and re-locks it) whenever
|
||||
# the system's own nixpkgs pin changes - it isn't automatically live on
|
||||
# every build, only on explicit update, same as any other flake input.
|
||||
nixpkgs.url = "nixpkgs";
|
||||
|
||||
pyproject-nix = {
|
||||
url = "github:pyproject-nix/pyproject.nix";
|
||||
|
||||
Reference in new issue
Block a user