nix copy: Add --profile and --out-link flags#11657
Conversation
This allows `nix copy` to atomically copy a store path and point a profile to it, without the risk that the store path might be GC'ed in between. This is useful for instance when deploying a new NixOS system profile from a remote store.
fricklerhandwerk
left a comment
There was a problem hiding this comment.
Needs release notes and some way to document in the command reference that this will exhibit the behavior outlined in the PR description. Right now --profile just says "The profile to operate on", and that will show on every command that uses the mixin - not very informative.
The cheap way to add the relevant docs for this command is adding an appropriate blurb to the new example. Ideally though we'd have a way to annotate what a flag, which enabled by a mixin, means for each command that uses it. Probably overkill, but mixins seem to add a set of possible behaviors, so we'd need to describe which behaviors are used how.
|
@fricklerhandwerk I agree, but that's a bit of a general problem beyond the scope of this PR, since currently every What do you mean with "appropriate blurb"? |
|
#11659 for the |
|
Fixes #11790 |
tomberek
left a comment
There was a problem hiding this comment.
Looks like there are some formatting things. Otherwise it looks like it works as expected. (x86-64_linux)
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-2-26-released/59211/1 |
Motivation
This allows
nix copyto atomically copy a store path and point a profile to it, without the risk that the store path might be GC'ed in between. This is useful for instance when deploying a new NixOS system profile from a remote store.Context
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.