Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix copy: Add --profile and --out-link flags #11657

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

edolstra
Copy link
Member

@edolstra edolstra commented Oct 8, 2024

Motivation

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.

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.

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.
@github-actions github-actions bot added documentation new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority labels Oct 8, 2024
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@edolstra edolstra changed the title nix copy: Add --profile flag nix copy: Add --profile and --out-link flags Oct 8, 2024
@edolstra
Copy link
Member Author

edolstra commented Oct 8, 2024

@fricklerhandwerk I agree, but that's a bit of a general problem beyond the scope of this PR, since currently every MixProfile command has this issue.

What do you mean with "appropriate blurb"?

@edolstra
Copy link
Member Author

edolstra commented Oct 8, 2024

#11659 for the --profile documentation issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority
Projects
Status: To triage
Development

Successfully merging this pull request may close these issues.

2 participants