From d641b24e1355159b9a85b70719c2d2e42625f599 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Sun, 22 Sep 2024 02:03:18 +0200 Subject: [PATCH] registry: add all flake inputs --- modules/system/nix/module.nix | 7 +++++-- modules/system/nix/registry.nix | 9 --------- 2 files changed, 5 insertions(+), 11 deletions(-) delete mode 100644 modules/system/nix/registry.nix 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; - }; - }; -}