From 89fe6aff28d336602258e5872c0ef8a948bd0990 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 1 Sep 2022 18:23:59 +0400 Subject: [PATCH] Pin flake-registry so that it's not fetched every time --- flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ profiles/nix/default.nix | 3 +++ 3 files changed, 25 insertions(+) diff --git a/flake.lock b/flake.lock index 33d612b..6d193f7 100644 --- a/flake.lock +++ b/flake.lock @@ -217,6 +217,22 @@ "type": "github" } }, + "flake-registry": { + "flake": false, + "locked": { + "lastModified": 1661161594, + "narHash": "sha256-tu1KKNLw+v7ZOIUPGDE66tn9vEyhIAWiiJYZRGGev8E=", + "owner": "nixos", + "repo": "flake-registry", + "rev": "8634fb4e1db6c76ce037bc00ef80f9ebd2616476", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "flake-registry", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1656928814, @@ -716,6 +732,7 @@ "deploy-rs": "deploy-rs", "direnv-vscode": "direnv-vscode", "flake-compat": "flake-compat_3", + "flake-registry": "flake-registry", "himalaya": "himalaya", "home-manager": "home-manager", "impermanence": "impermanence", diff --git a/flake.nix b/flake.nix index f864439..30b7dcc 100644 --- a/flake.nix +++ b/flake.nix @@ -89,6 +89,11 @@ url = "github:gpoore/codebraid"; flake = false; }; + + flake-registry = { + url = "github:nixos/flake-registry"; + flake = false; + }; }; outputs = { nixpkgs, self, nix, deploy-rs, ... }@inputs: diff --git a/profiles/nix/default.nix b/profiles/nix/default.nix index d3a8b9b..18d6b45 100644 --- a/profiles/nix/default.nix +++ b/profiles/nix/default.nix @@ -10,7 +10,10 @@ extraOptions = '' builders-use-substitutes = true + # Enable flakes experimental-features = nix-command flakes + # Prevent Nix from fetching the registry every time + flake-registry = ${inputs.flake-registry}/flake-registry.json ''; settings = {