diff --git a/modules/system/nix/module.nix b/modules/system/nix/module.nix index c00dd46..3157497 100644 --- a/modules/system/nix/module.nix +++ b/modules/system/nix/module.nix @@ -10,8 +10,7 @@ in { imports = [ ./documentation.nix # nixos documentation - ./nixpkgs.nix # global nixpkgs configuration.nix - ./registry.nix + ./nixpkgs.nix # global nixpkgs configuration inputs.lix-module.nixosModules.default ]; @@ -24,6 +23,10 @@ in { # fuck channels, no thanks 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 # Making legacy nix commands consistent as well nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; diff --git a/modules/system/nix/registry.nix b/modules/system/nix/registry.nix deleted file mode 100644 index a166ba4..0000000 --- a/modules/system/nix/registry.nix +++ /dev/null @@ -1,9 +0,0 @@ -{inputs, ...}: { - # Big thanks to Dianimo for this! - nix = { - registry = { - nixpkgs.flake = inputs.nixpkgs; - default.flake = inputs.nixpkgs; - }; - }; -}