From 035eaeadbec18e629b8d5046676922757437aba0 Mon Sep 17 00:00:00 2001 From: electria Date: Tue, 15 Sep 2026 11:10:32 -0700 Subject: [PATCH] defaults: add nixpkgs-newest to the registry --- defaults/nix.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/defaults/nix.nix b/defaults/nix.nix index 55a0e70..4cdab68 100644 --- a/defaults/nix.nix +++ b/defaults/nix.nix @@ -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"