1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 13:06:01 +01:00

Merge pull request #14518 from roberth/channel-subdomain

Change channel URLs to channels.nixos.org subdomain
This commit is contained in:
Jörg Thalheim 2025-11-09 15:18:07 +00:00 committed by GitHub
commit 08a8bae8b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 18 additions and 9 deletions

View file

@ -0,0 +1,9 @@
---
synopsis: Channel URLs migrated to channels.nixos.org subdomain
prs: [14518]
issues: [14517]
---
Channel URLs have been updated from `https://nixos.org/channels/` to `https://channels.nixos.org/` throughout Nix.
The subdomain provides better reliability with IPv6 support and improved CDN distribution. The old domain apex (`nixos.org/channels/`) currently redirects to the new location but may be deprecated in the future.

View file

@ -11,7 +11,7 @@
Channels are a mechanism for referencing remote Nix expressions and conveniently retrieving their latest version. Channels are a mechanism for referencing remote Nix expressions and conveniently retrieving their latest version.
The moving parts of channels are: The moving parts of channels are:
- The official channels listed at <https://nixos.org/channels> - The official channels listed at <https://channels.nixos.org>
- The user-specific list of [subscribed channels](#subscribed-channels) - The user-specific list of [subscribed channels](#subscribed-channels)
- The [downloaded channel contents](#channels) - The [downloaded channel contents](#channels)
- The [Nix expression search path](@docroot@/command-ref/conf-file.md#conf-nix-path), set with the [`-I` option](#opt-I) or the [`NIX_PATH` environment variable](#env-NIX_PATH) - The [Nix expression search path](@docroot@/command-ref/conf-file.md#conf-nix-path), set with the [`-I` option](#opt-I) or the [`NIX_PATH` environment variable](#env-NIX_PATH)
@ -88,9 +88,9 @@ This command has the following operations:
Subscribe to the Nixpkgs channel and run `hello` from the GNU Hello package: Subscribe to the Nixpkgs channel and run `hello` from the GNU Hello package:
```console ```console
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable $ nix-channel --add https://channels.nixos.org/nixpkgs-unstable
$ nix-channel --list $ nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs nixpkgs https://channels.nixos.org/nixpkgs
$ nix-channel --update $ nix-channel --update
$ nix-shell -p hello --run hello $ nix-shell -p hello --run hello
hello hello

View file

@ -358,7 +358,7 @@ This release has the following new features:
they are needed for evaluation. they are needed for evaluation.
- You can now use `channel:` as a short-hand for - You can now use `channel:` as a short-hand for
<https://nixos.org/channels//nixexprs.tar.xz>. For example, <https://nixos.org/channels//nixexprs.tar.xz> [now <https://channels.nixos.org//nixexprs.tar.xz>]. For example,
`nix-build channel:nixos-15.09 -A hello` will build the GNU Hello `nix-build channel:nixos-15.09 -A hello` will build the GNU Hello
package from the `nixos-15.09` channel. In the future, this may package from the `nixos-15.09` channel. In the future, this may
use Git to fetch updates more efficiently. use Git to fetch updates more efficiently.

View file

@ -10,7 +10,7 @@
tag ? "latest", tag ? "latest",
bundleNixpkgs ? true, bundleNixpkgs ? true,
channelName ? "nixpkgs", channelName ? "nixpkgs",
channelURL ? "https://nixos.org/channels/nixpkgs-unstable", channelURL ? "https://channels.nixos.org/nixpkgs-unstable",
extraPkgs ? [ ], extraPkgs ? [ ],
maxLayers ? 70, maxLayers ? 70,
nixConf ? { }, nixConf ? { },

View file

@ -714,7 +714,7 @@ EOF
place_channel_configuration() { place_channel_configuration() {
if [ -z "${NIX_INSTALLER_NO_CHANNEL_ADD:-}" ]; then if [ -z "${NIX_INSTALLER_NO_CHANNEL_ADD:-}" ]; then
echo "https://nixos.org/channels/nixpkgs-unstable nixpkgs" > "$SCRATCH/.nix-channels" echo "https://channels.nixos.org/nixpkgs-unstable nixpkgs" > "$SCRATCH/.nix-channels"
_sudo "to set up the default system channel (part 1)" \ _sudo "to set up the default system channel (part 1)" \
install -m 0644 "$SCRATCH/.nix-channels" "$ROOT_HOME/.nix-channels" install -m 0644 "$SCRATCH/.nix-channels" "$ROOT_HOME/.nix-channels"
fi fi

View file

@ -213,7 +213,7 @@ fi
# Subscribe the user to the Nixpkgs channel and fetch it. # Subscribe the user to the Nixpkgs channel and fetch it.
if [ -z "$NIX_INSTALLER_NO_CHANNEL_ADD" ]; then if [ -z "$NIX_INSTALLER_NO_CHANNEL_ADD" ]; then
if ! "$nix/bin/nix-channel" --list | grep -q "^nixpkgs "; then if ! "$nix/bin/nix-channel" --list | grep -q "^nixpkgs "; then
"$nix/bin/nix-channel" --add https://nixos.org/channels/nixpkgs-unstable "$nix/bin/nix-channel" --add https://channels.nixos.org/nixpkgs-unstable
fi fi
if [ -z "$_NIX_INSTALLER_TEST" ]; then if [ -z "$_NIX_INSTALLER_TEST" ]; then
if ! "$nix/bin/nix-channel" --update nixpkgs; then if ! "$nix/bin/nix-channel" --update nixpkgs; then

View file

@ -92,7 +92,7 @@ bool EvalSettings::isPseudoUrl(std::string_view s)
std::string EvalSettings::resolvePseudoUrl(std::string_view url) std::string EvalSettings::resolvePseudoUrl(std::string_view url)
{ {
if (hasPrefix(url, "channel:")) if (hasPrefix(url, "channel:"))
return "https://nixos.org/channels/" + std::string(url.substr(8)) + "/nixexprs.tar.xz"; return "https://channels.nixos.org/" + std::string(url.substr(8)) + "/nixexprs.tar.xz";
else else
return std::string(url); return std::string(url);
} }

View file

@ -2234,7 +2234,7 @@ static RegisterPrimOp primop_findFile(
> - ``` > - ```
> { > {
> prefix = "nixpkgs"; > prefix = "nixpkgs";
> path = "https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz"; > path = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
> } > }
> ``` > ```