-
-
Notifications
You must be signed in to change notification settings - Fork 17.3k
nixos-rebuild-ng: init #354029
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
nixos-rebuild-ng: init #354029
Conversation
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nixos-rebuild-ng-a-nixos-rebuild-rewrite/55606/1 |
9a37931 to
b4e6e63
Compare
8866519 to
5ff4130
Compare
3f23d12 to
c7d41e2
Compare
7aabac3 to
a27c65c
Compare
|
I think this looks good for an early adopter release |
a27c65c to
f36168c
Compare
bb2e3ef to
e19ac27
Compare
|
CC @Sigmanificient since you made some good reviews about my Python code. |
f7c00d1 to
c4264e5
Compare
|
@ofborg test nixos-rebuild-ng |
|
@ofborg build nixos-rebuild-ng |
6a74d89 to
9e6ece3
Compare
|
|
For fun: BTW, I either need to run |
|
Nice! It's using the manpage of nixos-rebuild now. Maybe we should gather more feedback around this --help behaviour but I tested here and it works as expected. LGTM |
|
We had the branch-off for There is a failure for |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nixos-rebuild-ng-a-nixos-rebuild-rewrite/55606/17 |
The current state of
nixos-rebuildis dare: it is one of the most critical piece of code we have in NixOS, but it has tons of issues:nixhad over the years, e.g.: it builds Flakes inside a temporary directory and read the resulting symlink since the code seems to predate--print-out-pathsflagGiven all of those above, improvements in the
nixos-rebuildare difficult to do. A full rewrite is probably the easier way to improve the situation since this can be done in a separate package that will not break anyone. So this is an attempt of the rewrite.The language of choice here is Python. I am open to other options here, and I mostly choose Python since it is the language I am most comfortable here, but I am open for other options. Still, I think Python is a good choice because:
nixpkgs, like theNixOSTestVMandsystemd-bootactivation scriptsmypyfor type checking,rufffor linting,pytestfor unit testingnixos-rebuildcurrently depends injqfor JSON parsing, while Python hasjsonin standard libraryI am aware about the current
switch-to-configuration-ngrewrite, however I am not sure what is the scope of that project vsnixos-rebuild. If the idea is just a drop-in replacement than both of those rewrites are ortogonal, sincenixos-rebuildalso includes some extra logic for e.g.: profile management. If the idea is to migrate more and more logic toswitch-to-configuration-ngand eventually dropnixos-rebuild, I am happy to close this PR.Objectives and Non-objectives
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.