defaults: add nixpkgs-newest to the registry

This commit is contained in:
electria 2026-09-15 11:10:32 -07:00
commit 035eaeadbe
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -15,6 +15,32 @@ in
};
config = lib.mkIf cfg.enable {
nix.registry = {
# the newest version of nixpkgs (which makes sense to fetch)
#
# this is useful because on a flake based system,
# "nixpkgs" is rewritten to a static store path
# (the nixpkgs input the system uses)
#
# that's useful to avoid redownloading nixpkgs constantly,
# but for packages that you need the newest version of,
# it's not suitable.
#
# so if you wanted the newest version (eg of yt-dlp)
# this is a good way: `nix shell nixpkgs-newest#yt-dlp`
nixpkgs-newest = {
from = {
type = "indirect";
id = "nixpkgs-newest";
};
to = {
type = "tarball";
# https://chaos.social/@hexa/117111428896044773
url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst";
};
};
};
# enable useful nix tools, and the flakes system
nix.settings.experimental-features = [
"nix-command"