mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-18 15:34:13 +01:00
12 lines
631 B
Nix
12 lines
631 B
Nix
{lib, nixpkgs, ...}: {
|
|
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
|
nix.channel.enable = false; # remove nix-channel related tools & configs, we use flakes instead.
|
|
|
|
# but NIX_PATH is still used by many useful tools, so we set it to the same value as the one used by this flake.
|
|
# Make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
|
|
environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
|
|
# https://github.com/NixOS/nix/issues/9574
|
|
nix.settings.nix-path = lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";
|
|
}
|