Navigation Menu

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

Rename nixos-rebuild to nixos #122715

Open
domenkozar opened this issue May 12, 2021 · 10 comments
Open

Rename nixos-rebuild to nixos #122715

domenkozar opened this issue May 12, 2021 · 10 comments

Comments

@domenkozar
Copy link
Member

Given that Nix commands are now all subcommands of nix CLI, it feels appropriate (with respect to user expectations) to do the same with nixos command.

Another reason is that some commands have little to do with rebuilding and there's no inherent reason they shouldn't be part of the toolkit. A good existing example is nixos-rebuild edit.

(keep around nixos-rebuild for backwards compatibility)

@domenkozar domenkozar changed the title Rename nixos-rebuild to nixos Rename nixos-rebuild to nixos May 12, 2021
@jtojnar
Copy link
Contributor

jtojnar commented May 12, 2021

Duplicate of #54188

See also: #100578

@domenkozar
Copy link
Member Author

domenkozar commented May 14, 2021

It's not a duplicate of #54188, since that issue a lot more ambitious. I'm merely asking for a rename, in the same spirit as #100578.

@kanashimia
Copy link
Member

kanashimia commented May 15, 2021

I'm merely asking for a rename, in the same spirit as #100578.

If so, then i'm against this, i would rather see a completely new tool, like with the nix command, than just a rename of one.
It would only cause troubles with an already existing documentation, and will bring nothing new.

nixos should be a replacement for all? of the nixos-* tools, like nix is a replacement for nix-* tools with the improved UI/UX.
Just renaming nixos-rebuild would prevent such tool from existing at all, as it would make adoptation extremely hard.

@domenkozar
Copy link
Member Author

It would only cause troubles with an already existing documentation, and will bring nothing new.

It opens up the possibility to bring in additional subcommands in the future with the minimal amount of work needed to get there.

nixos should be a replacement for all? of the nixos-* tools, like nix is a replacement for nix-* tools with the improved UI/UX.
Just renaming nixos-rebuild would prevent such tool from existing at all, as it would make adoptation extremely hard.

I agree, but how does renaming prevent that?

@kanashimia
Copy link
Member

I agree, but how does renaming prevent that?

Because it is much easier to push breaking changes in the new WIP tool (like changing command names, structure, behaviour, etc.), while still keeping the old one - it would be a missed opportunity to not take advantage of this, nothing more.
After thinking about it i don't think that it is as critical in this case, but still.

@asymmetric
Copy link
Contributor

I agree that, in the long term, we should have a nixos command that does everything the various nixos-* commands do now, à la nix. And IMO @kanashimia has a point that occupying the nixos names by renaming nixos-rebuild to it will make it harder to transition to that long term goal.

OTOH, we don't want perfect be the enemy of good, and considering #54188 is a few years old and hasn't seen progress, I wonder if we should just do what we can with the resources we have now (sounds a bit pessimistic maybe).

@domenkozar how do you see a migration from nixos-rebuild -> rename to nixos -> full-fledged nixos command?

@domenkozar
Copy link
Member Author

I agree that, in the long term, we should have a nixos command that does everything the various nixos-* commands do now, à la nix. And IMO @kanashimia has a point that occupying the nixos names by renaming nixos-rebuild to it will make it harder to transition to that long term goal.

OTOH, we don't want perfect be the enemy of good, and considering #54188 is a few years old and hasn't seen progress, I wonder if we should just do what we can with the resources we have now (sounds a bit pessimistic maybe).

@domenkozar how do you see a migration from nixos-rebuild -> rename to nixos -> full-fledged nixos command?

Looking at #54188, I see that we could do 90% of what's listed there without breaking backward compatibility. So if we can give up that 10% and do this incrementally it has a higher chance of happening.

@asymmetric
Copy link
Contributor

asymmetric commented May 17, 2021

@domenkozar what's the 10% we'd have to drop?

I'd like to point out that the current bash script is pretty spaghetti-like as it is, with the handling of flake and legacy modes, so I don't know how much more complexity it can take, before a refactor.

@stale
Copy link

stale bot commented Nov 16, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 16, 2021
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixpkgs-cli-working-group/30517/2

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants