Open domenkozar opened 3 years ago
Duplicate of https://github.com/NixOS/nixpkgs/issues/54188
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.
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.
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?
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.
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 https://github.com/NixOS/nixpkgs/issues/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?
I agree that, in the long term, we should have a
nixos
command that does everything the variousnixos-*
commands do now, à lanix
. And IMO @kanashimia has a point that occupying thenixos
names by renamingnixos-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 tonixos
-> full-fledgednixos
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.
@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.
I marked this as stale due to inactivity. → More info
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
Given that Nix commands are now all subcommands of
nix
CLI, it feels appropriate (with respect to user expectations) to do the same withnixos
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)