Skip to content

Commit

Permalink
performance(core): speed up nix search
Browse files Browse the repository at this point in the history
  • Loading branch information
yunfachi committed Dec 1, 2023
1 parent 690045d commit f0b1408
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/core/nix.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
{
inputs,
lib,
pkgs,
...
}: {
nix = {
extraOptions = "experimental-features = nix-command flakes";
package = pkgs.nixVersions.unstable;

# https://www.foodogsquared.one/posts/2023-11-10-speeding-up-nixos-package-search-on-the-terminal/
registry =
lib.mapAttrs'
(name: flake: let
modifiedName =
if (name == "self")
then "config"
else name;
in
lib.nameValuePair modifiedName {inherit flake;})
inputs;
};
}

0 comments on commit f0b1408

Please sign in to comment.