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