-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
tree-wide: rename nixos-rebuild to nixos-config #100578
Conversation
After all these years, `nixos-rebuild` is still weird to type. `nixos-config` is much more intuitive. Compare `nixos-rebuild build` vs `nixos-config build`. Or `nixos-rebuild switch` with `nixos-config switch`. A fresh mind is able to make out what the latter will do.
This does not feel any less weird to me, we are not But if we rename it we should also apply all the other proposed breaking changes, to avoid people having to migrate twice. Not sure who proposed it and where, though. Edit: Looks like I was thinking of this: #54188 |
I don't see #54188 realistically being adopted. It's trying to reach for perfection and opens a lot of rabbit holes. There is a reason why it's been open for 1.5 years.
Another example is What we could do in a future PR is introduce a |
Another argument is that it's important to keep backward-compatibility. What |
I don't think it needs to be perfect immediately. E.g. we could just start by renaming
Well, that applies to renaming nixos-rebuild to nixos-config as well. We just need to provide a compatibility symlink for some commands. (I don't think we need compatibility for nixos-option, nixos-infect, nixos-lustrate etc. since they're probably not referenced in a lot of scripts.) |
Should I just rename it to plain |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/what-to-show-in-list-of-nixos-generations/11216/6 |
Just after 21.05 is released would be a really good time to make the flip. Rename and leave |
I think listing and deleting previous generations should be part of the new E.g. I currently use |
@zimbatm do you have capacity to tackle this anytime soon? Otherwise I'm happy to follow up with an up to date PR. I think both |
I really don't think we should do this purely for the sake of renaming it. This renaming provides almost zero benefit at a huge cost. Instead we should keep this possibility in mind for when we might do a bigger redesign of the NixOS CLI, such as perhaps with Flakes, or with a general modernization or UX improvement, similar to the Nix CLI. When that happens, a name change comes at no cost, as people will be relearning a new interface anyways. |
agreed, there is a cost to rename things |
Motivation for this change
After all these years,
nixos-rebuild
is still weird to type.nixos-config
is much more intuitive.Compare
nixos-rebuild build
vsnixos-config build
. Ornixos-rebuild switch
withnixos-config switch
. A fresh mind is able to make outwhat the latter will do.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)