Skip to content

Commit

Permalink
fix: option `nix.registry.nixpkgs.to.path' has conflicting definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan4yin committed Apr 20, 2024
1 parent 6b016a2 commit 5583f1f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions modules/nixos/base/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,5 @@
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
nix.settings.auto-optimise-store = true;

# 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";
}

0 comments on commit 5583f1f

Please sign in to comment.