From 4dba4df4bdfe6634d42a24029dadcd2f183e7b15 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Mon, 11 Dec 2023 00:11:24 +0800 Subject: [PATCH] nixos: nix: flakes: disable flake-registry --- nixos/profiles/core/nix/flake.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nixos/profiles/core/nix/flake.nix b/nixos/profiles/core/nix/flake.nix index dcfcd25..641dea6 100755 --- a/nixos/profiles/core/nix/flake.nix +++ b/nixos/profiles/core/nix/flake.nix @@ -1,10 +1,20 @@ -{pkgs, ...}: { +{ + pkgs, + inputs, + ... +}: { # Enable Flakes nix.settings.experimental-features = ["nix-command" "flakes"]; # Disable nix-channel nix.channel.enable = false; + # Disable flake-registry + # https://nixos-and-flakes.thiscute.world/best-practices/nix-path-and-flake-registry + nix.settings.flake-registry = ""; + nix.registry.nixpkgs.flake = inputs.nixpkgs; + nix.registry.nixpkgs-stable.flake = inputs.nixpkgs-stable; + # Install Git environment.systemPackages = [pkgs.git];