mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-18 23:19:46 +02:00
refactor: macos's nixpkgs registry
This commit is contained in:
@@ -18,13 +18,6 @@ in
|
||||
++ [
|
||||
({lib, ...}: {
|
||||
nixpkgs.pkgs = import nixpkgs {inherit system;};
|
||||
# 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"];
|
||||
})
|
||||
]
|
||||
++ (
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{pkgs, ...}: {
|
||||
{
|
||||
lib,
|
||||
nixpkgs,
|
||||
...
|
||||
}: {
|
||||
###################################################################################
|
||||
#
|
||||
# Core configuration for nix-darwin
|
||||
@@ -24,4 +28,12 @@
|
||||
nix.settings.auto-optimise-store = 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"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user