Skip to content

Imply --offline during tab completion#161

Merged
edolstra merged 1 commit intodetsys-mainfrom
offline-tab-completion-detsys
Jul 28, 2025
Merged

Imply --offline during tab completion#161
edolstra merged 1 commit intodetsys-mainfrom
offline-tab-completion-detsys

Conversation

@edolstra
Copy link
Collaborator

Motivation

A small QoL improvement (cherry-picked from upstream NixOS#12595).

Previously, if you don't have Internet connectivity, tab completion might try to fetch the flake registry, e.g.

$ NIX_GET_COMPLETIONS=4 nix build -vvvvv --offline /home/eelco/De
evaluating file '<nix/derivation-internal.nix>'
downloading 'https://channels.nixos.org/flake-registry.json'...
warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; retrying in 294 ms
warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; retrying in 541 ms
warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; retrying in 1230 ms
warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; retrying in 2285 ms
warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; using cached version

Context

Previously, if you don't have Internet connectivity, tab completion
might try to fetch the flake registry, e.g.

  $ NIX_GET_COMPLETIONS=4 nix build -vvvvv --offline /home/eelco/De
  evaluating file '<nix/derivation-internal.nix>'
  downloading 'https://channels.nixos.org/flake-registry.json'...
  warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; retrying in 294 ms
  warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; retrying in 541 ms
  warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; retrying in 1230 ms
  warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; retrying in 2285 ms
  warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Could not resolve hostname (6) Could not resolve host: channels.nixos.org; using cached version
@github-actions
Copy link

@github-actions github-actions bot temporarily deployed to pull request July 23, 2025 19:37 Inactive
@edolstra edolstra added this pull request to the merge queue Jul 28, 2025
Merged via the queue into detsys-main with commit 600c073 Jul 28, 2025
33 checks passed
@edolstra edolstra deleted the offline-tab-completion-detsys branch July 28, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants