fix: nix path (#147)

This commit is contained in:
Ryan Yin
2024-07-31 13:39:49 +08:00
committed by GitHub
parent 59a46844a7
commit 325f82b9cc
2 changed files with 10 additions and 12 deletions

View File

@@ -2,6 +2,8 @@
pkgs, pkgs,
myvars, myvars,
nuenv, nuenv,
nixpkgs,
lib,
... ...
} @ args: { } @ args: {
nixpkgs.overlays = nixpkgs.overlays =
@@ -111,4 +113,12 @@
]; ];
builders-use-substitutes = true; builders-use-substitutes = true;
}; };
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
nix.registry.nixpkgs.flake = nixpkgs;
environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
# make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
# discard all the default paths, and only use the one from this flake.
nix.nixPath = lib.mkForce ["/etc/nix/inputs"];
} }

View File

@@ -1,8 +1,4 @@
{ {
lib,
nixpkgs,
...
}: {
################################################################################### ###################################################################################
# #
# Core configuration for nix-darwin # Core configuration for nix-darwin
@@ -28,12 +24,4 @@
nix.settings.auto-optimise-store = false; nix.settings.auto-optimise-store = false;
nix.gc.automatic = false; nix.gc.automatic = false;
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
nix.registry.nixpkgs.flake = nixpkgs;
environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
# make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
# discard all the default paths, and only use the one from this flake.
nix.nixPath = lib.mkForce ["/etc/nix/inputs"];
} }