registry: add all flake inputs

This commit is contained in:
Charlie Root 2024-09-22 02:03:18 +02:00
commit d641b24e13
2 changed files with 5 additions and 11 deletions

View file

@ -10,8 +10,7 @@
in { in {
imports = [ imports = [
./documentation.nix # nixos documentation ./documentation.nix # nixos documentation
./nixpkgs.nix # global nixpkgs configuration.nix ./nixpkgs.nix # global nixpkgs configuration
./registry.nix
inputs.lix-module.nixosModules.default inputs.lix-module.nixosModules.default
]; ];
@ -24,6 +23,10 @@ in {
# fuck channels, no thanks # fuck channels, no thanks
channel.enable = mkForce false; channel.enable = mkForce false;
# this is taken from sioodmy.
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
# This will additionally add your inputs to the system's legacy channels # This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well # Making legacy nix commands consistent as well
nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;

View file

@ -1,9 +0,0 @@
{inputs, ...}: {
# Big thanks to Dianimo for this!
nix = {
registry = {
nixpkgs.flake = inputs.nixpkgs;
default.flake = inputs.nixpkgs;
};
};
}