nixos: nix: flakes: disable flake-registry

This commit is contained in:
Guanran Wang 2023-12-11 00:11:24 +08:00
parent ada1f8980e
commit 4dba4df4bd
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -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];