Repository navigation
Open
Milestone
Description
This is a DRAFT
Tracking for the stabilizing effort:
Tasks
- consider feature mappings with legacy CLI (not expected to be 1-1)
- review correctness of command
- do all
--helpoptions make sense - create any issues or PRs to resolve the above, we will link it here for tracking
- verify "ready for stabilization"
The goal isn't to stabilize the whole CLI at once. A bunch of less-frequent commands can wait for a bit while we focus on the most important ones.
First batch of stabilization
-
nix daemon -
nix nar- Stabilise
nix narand subcommands #8875 - request for contributions: make this usable as a general utility. eg: the unpack/extract
- rename to pack/unpack
- (non-blockers) refine other subcommands such as cat, ls, tar conversions
- Stabilise
-
nix hash- rename sub-commands: Stabilise
nix hashand subcommands #8876 -
nix hash convert [--type sha256] --from (base16|...|sri) --to base64 strings... -
nix hash path
- rename sub-commands: Stabilise
-
nix key - new-command:
nix config- Check
- Show
-
nix store-
nix store gcnix store gc: Stabilize #7608- Make 'nix store gc' use the auto-GC policy #7851 : honor
min-freeandmax-freeconfig options, and remove--maxflag- note:
--maxis closer to the understanding of--minand can/should also be idempotent relative to disk space?
- note:
- Make 'nix store gc' use the auto-GC policy #7851 : honor
-
nix store pingStabilisenix store ping#8914- trusted returned as integer is awkward, should be a boolean
- rename to
nix store info
-
nix store add-file,nix store add-pathStabilisenix store add#8915-
--recursiveshould be the default due to history and to match string-interpolation behavior - need clarification of how to specify outputHashMode, outputHashAlgo, etc.
- expose as
--key valueorcreate PR to CLI guidelines--value1|--value2
-
-
Not a blocker for stabilisationnix store import,nix store export -
nix store deleteprovide better information about why something was not deletedNot required for stabilisation-
MakeNot required for stabilisationnix store delete ./resultwork #9475
-
nix store optimise- stabilise as is!
-
To be discussed
Stuff that hasn't been processed yet
-
nix copy -
nix describe-storesnix help-stores -
nix path-info -
nix build -
nix develop -
nix print-dev-env -
nix shell -
nix run -
nix search -
nix repl- Technically already stable
-
nix eval -
nix bundle -
nix edit -
nix fmt -
nix log -
nix registry -
nix why-depends -
nix derivation -
nix profile:nix profilehas bad UX #7966 -
nix realisation -
nix upgrade-nix -
nix flake
Global concerns
- settings
- config
- flags
- layering, see: [RFC 0136] A plan to stabilize the new CLI and Flakes incrementally rfcs#136
- (non-blocking) Can't add a file from stdin #7773
Blocked on installables
-
nix shell - ...
To stabilise in a later batch
These are low priority and have more involved background issues we have to clarify first
nix store catnix store lsnix store copy-lognix store copy-sigsnix store diff-closuresnix store make-content-addressednix store path-from-hash-partnix store prefetch-filenix store repair-
nix store verify- document the defaults for the options
- ensure that
sigs-neededonly takes into account the cryptographic portion of the key, not the name
-
nix store sign- see previous: Unsigned derivations uploaded to S3 #6960 (comment)
- QUESTION: sign only until other signatures encountered (limited
-r) -
--key-file -to read key from stdin, exclusive with--stdin, but then how to pass both via pipe? - QUESTION: add a
--pipe FDfor which--stdinis alias for--pipe /dev/fd/0?
References
Reacted by Théophane Hufschmitt, Aaron Jheng, Dennis Gosnell, ryan4yin | 二花, boda, mxkrsv, Andrii Oriekhov, Nico D'Cotta, 초록상자, Tom and 25 more
Reacted by Alyssa Ross, ryan4yin | 二花, Minghong Xu, Andrii Oriekhov, Nico D'Cotta, The Little Waltz, Jack Nystrom, Arut++, Whoman, Viorel-Cătălin Răpițeanu and 1 more
Reacted by Théophane Hufschmitt, Aaron Jheng, dryya, ryan4yin | 二花, Skyler Grey, Andrii Oriekhov, Aleksana and Arut++
Reacted by Ryan J.P. Casalino, ryan4yin | 二花, goyalyashpal, Jack Nystrom, Arut++ and sokai
Metadata
Metadata
Assignees
Projects
- StatusShow more project fieldsIn discussion
Activity
Ericson2314 commentedon Feb 3, 2023
#7740 / #5638 being hard I think it something to think about prior to command stabilization.
[-]stabilization effort[/-][+]CLI stabilization effort[/+]nixos-discourse commentedon Feb 13, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2023-01-27-nix-team-meeting-minutes-27/25434/1
fricklerhandwerk commentedon Feb 13, 2023
Discussed in the Nix team meeting 2023-02-10:
Decision: work through one complete command at a time and write down the process. once finished and everyone is confident to reproduce that process on one's own, do the rest of the work in parallel.
Complete discussion
nix store gcnixos-discourse commentedon Feb 13, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2023-02-10-nix-team-meeting-minutes-31/25438/1
Ericson2314 commentedon Feb 13, 2023
Two topics (with my PR fixes, if we like my solution) that I think would be good to track:
--help--- Stuctured command stability #7611(My middle PR, #7610, corresponds to #7820 already listed here, so there is no need to link the issue directly.)
nixos-discourse commentedon Feb 13, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2023-02-10-nix-team-meeting-minutes-32/25442/1
nixos-discourse commentedon Feb 17, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/tweag-nix-dev-update-44/25546/1
fricklerhandwerk commentedon Mar 22, 2023
Discussed general design considerations in Nix team meeting 2023-03-20:
@Ericson2314 and @fricklerhandwerk prefer to have a clean separation of composable "plumbing" commands (reflecting architectural separation of store and evaluation layers) and convenient "porcelain" commands that aim for brevity and common use cases. Specifically it should be
nix store copy[-(closure|path|...)] <store path>andnix copy <installable>. @edolstra noted that the original goal of the CLI redesign was not to have that distinction, and that this has been decided long ago. The merit of this was disputed. We also briefly touched upon perceived problems withnix-env, where one can observe a similar tension.There was no conclusion.
Although apparently this has been talked about multiple times in the past years, and @edolstra is (rightly) annoyed about rehashing the arguments, there seems to be no record of the prior discussions. (Help digging them out highly appreciated!)
Complete discussion
nix copyto bring backnix-pushfunctionalitynix-pushwrapper just to have the interface in placenix copyseems to only operate at the store level, why is it notnix store copy?nix store copysounds like you'd copy a storenix store copy-lognix store copy-pathnix copyis hard to stabilise in generalnix-pushin terms of old CLI idiomsnix copynix store copycommand that only works on pathsnix copy nixpkgs#hellonix gcwe could also have that-E '1+1'as an installable will throw an error that doesn't help anywone who doesn't know how the underlying mechanism worksnix copythat is not in general copyable?nix copy --todoesn't copy and attempts a build #7095nix copyrun a build?nix-envapparently creates confusion, which is related to the interface design issue)19 remaining items
nixos-discourse commentedon Jan 16, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/tweag-nix-dev-update-52/38343/1
nixos-discourse commentedon Jan 31, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/contribute-to-the-nix-2023-recap/37484/13
nixos-discourse commentedon Oct 27, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/nix-team-member-suggests-removing-flakes-data-suggest-it-isnt-a-good-idea-please-remove-the-experimental-flag-instead/54959/65
nixos-discourse commentedon Oct 29, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/nix-team-member-suggests-removing-flakes-data-suggest-it-isnt-a-good-idea-please-remove-the-experimental-flag-instead/54959/151
poly2it commentedon Dec 26, 2024
Why should
nix run --fileimply impure? Is it any more impure than passing an--expr? As I see it, it has been provided explicitly as an input by the user.nixos-discourse commentedon Mar 8, 2025
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/determinate-nix-3-0/61202/105
sdht0 commentedon May 7, 2025
What's the latest news on this effort? The last update here seems to be from October.
edolstra commentedon Sep 12, 2025
Added replacements for
nix-store --export/--importin #13969.x10an14 commentedon Oct 12, 2025
How does (if it does at all) this issue address the
nix-build --attrsflag which I can't (perhaps in error) find an equivalent for inman nix3-build?nixos-discourse commentedon Jul 13, 2026
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/discussion-of-flakes-from-2025-nixos-community-survey-report/78853/53