Skip to content

nixos-rebuild-ng: add --use-prebuilt-closure option#464490

Closed
skovati wants to merge 1 commit intoNixOS:staging-nixosfrom
skovati:nixos-rebuild-ng-add-prebuilt-option
Closed

nixos-rebuild-ng: add --use-prebuilt-closure option#464490
skovati wants to merge 1 commit intoNixOS:staging-nixosfrom
skovati:nixos-rebuild-ng-add-prebuilt-option

Conversation

@skovati
Copy link
Copy Markdown
Contributor

@skovati skovati commented Nov 24, 2025

Adds a new --use-prebuilt-closure option to nixos-rebuild-ng, which will avoid building the new system closure and instead use the prebuilt one specified.

I wanted this feature since I often nix copy --from closures from my build machine and want to use the proper nixos-rebuild script to switch into that closure. I could also see this being useful to activate old generations of closures.

As a quick sanity check, you can run something like the following to test this new feature:

sudo ./result/bin/nixos-rebuild-ng --use-prebuilt-closure /run/current-system/ switch

which of course, will just reactivate your currently running closure.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot requested a review from thiagokokada November 24, 2025 08:04
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Nov 24, 2025
@mdaniels5757 mdaniels5757 changed the base branch from master to staging-nixos January 18, 2026 03:40
@nixpkgs-ci nixpkgs-ci bot closed this Jan 18, 2026
@nixpkgs-ci nixpkgs-ci bot reopened this Jan 18, 2026
@thiagokokada
Copy link
Copy Markdown
Contributor

thiagokokada commented Jan 22, 2026

Replaced by: #482430.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants