tree-wide: set nixpkgs in NIX_PATH without flake

This prevents double fetch
This commit is contained in:
Primrose 2025-12-08 20:17:38 +08:00
parent 076a4448e7
commit 18418415d1
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
3 changed files with 9 additions and 12 deletions

View file

@ -31,6 +31,9 @@ in
# nixpkgs
#
{
# don't use `nixpkgs.flake.source`, it uses flake so it double fetches
nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ];
nixpkgs = {
overlays = map import [
../packages/overlay.nix
@ -39,10 +42,6 @@ in
../overlays/lix.nix
../overlays/nix-monitored.nix
];
# Set NIX_PATH and flake registry at the same time
# https://github.com/NixOS/nixpkgs/pull/254405
flake.source = sources.nixpkgs;
};
nix.package = pkgs.nix-monitored;

View file

@ -34,6 +34,9 @@ in
# nixpkgs
#
{
# don't use `nixpkgs.flake.source`, it uses flake so it double fetches
nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ];
nixpkgs = {
overlays = map import [
../overlays/agenix.nix
@ -45,10 +48,6 @@ in
../overlays/lix.nix
../overlays/nix-monitored.nix
];
# Set NIX_PATH and flake registry at the same time
# https://github.com/NixOS/nixpkgs/pull/254405
flake.source = sources.nixpkgs;
};
nix.package = pkgs.nix-monitored;

View file

@ -35,6 +35,9 @@ in
nix = {
distributedBuilds = true;
settings.builders-use-substitutes = true;
# don't use `nixpkgs.flake.source`, it uses flake so it double fetches
nixPath = [ "nixpkgs=${sources.nixpkgs}" ];
};
nixpkgs = {
@ -70,10 +73,6 @@ in
../overlays/lix.nix
../overlays/nix-monitored.nix
];
# Set NIX_PATH and flake registry at the same time
# https://github.com/NixOS/nixpkgs/pull/254405
flake.source = sources.nixpkgs;
};
nix.package = pkgs.nix-monitored;