Skip to content

Conversation

irisjae
Copy link

@irisjae irisjae commented Jun 23, 2025

Change runCommand to runCommandLocal so that config changes can build offline without unnecessarily consulting substituters.

A fresh home-manager-generation runCommand derivation is created for each config change, but it should really be runCommandLocal, as it is exceedingly improbable that my config will be cached. Furthermore, this causes NixOS rebuilds to fail offline even if only text config changes are applied, as runCommand causes home-manager to ask Nix to always try consulting substituters and fail if it is unreachable.

A number of other runCommands are also in this module; can someone review if they should also be changed to runCommandLocal?

Description

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt-rfc-style keep-sorted --run treefmt.

  • [] Code tested through nix-shell --pure tests -A run.all
    or nix build --reference-lock-file flake.lock ./tests#test-all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

… changes

can build offline (without unnecessarily consulting substituters)
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.

1 participant