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: init as package #48122
Conversation
Success on aarch64-linux (full log) Attempted: nixos-rebuild Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: nixos-rebuild Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: nixos-rebuild Partial log (click to expand)
|
fd04885
to
2c451f1
Compare
2c451f1
to
b62332f
Compare
Success on x86_64-darwin (full log) Attempted: nixos-rebuild Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: nixos-rebuild Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: nixos-rebuild Partial log (click to expand)
|
Seems like it's popular so I moved all the other tools. There is a new
|
@GrahamcOfBorg build nixos-build-vms nixos-enter nixos-generate-config nixos-install nixos-option nixos-rebuild nixos-version |
It seems that one could replace nixops with a shell script for the most part. |
b62332f
to
3b89f0a
Compare
I want to back-port this to 18.09. Did a bunch of tests and it seems to be working well. Any objections? |
Make the codeName globally accessible in the repo. The release is not only for NixOS anymore.
Move all the nixos-* scripts from the nixos distribution as real packages in the pkgs/ package set. This allows non-nixos users to run the script as well. For example, deploying a remote machine with: nixos-rebuild --target-host root@hostname --build-host root@hostname
3b89f0a
to
1875344
Compare
@GrahamcOfBorg build nixos-build-vms nixos-enter nixos-generate-config nixos-install nixos-option nixos-rebuild nixos-version |
Success on x86_64-darwin (full log) Attempted: nixos-build-vms, nixos-enter, nixos-install, nixos-option, nixos-rebuild, nixos-version The following builds were skipped because they don't evaluate on x86_64-darwin: nixos-generate-config Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: nixos-build-vms, nixos-enter, nixos-generate-config, nixos-install, nixos-option, nixos-rebuild, nixos-version Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: nixos-build-vms, nixos-enter, nixos-generate-config, nixos-install, nixos-option, nixos-rebuild, nixos-version Partial log (click to expand)
|
I'll just go ahead and merge this in master. If everything goes well, I will cherry-pick this in 18.09 next Monday. |
@@ -0,0 +1 @@ | |||
Koi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use camelCase filenames. Also, does this really have to be in the root directory of the repository?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about something like this #48588 ?
I'm strongly against this. These are not packages - they should be in the NixOS source tree, not in |
* 'master' of https://github.com/NixOS/nixpkgs: (104 commits) python3.pkgs.pyls: 0.2.1 -> 0.3.0 chromium: fix aarch64 build (NixOS#48586) pythonPackages.cligj: 0.4.0 -> 0.5.0 (NixOS#48584) Flexget: 2.15.1 -> 2.16.2 (NixOS#48583) gitolite 3.6.7 -> 3.6.10 (NixOS#48562) oh-my-zsh: 2018-09-03 -> 2018-09-14 julia_10: update to 1.0.1 signal-desktop: 1.16.2 -> 1.16.3 Revert "Merge pull request NixOS#48122 from zimbatm/pkg-nixos-rebuild" terraform-providers.libvirt: fix plugin output (NixOS#48577) libssh: 0.7.5 -> 0.7.6 googler: 3.7 -> 3.7.1 (NixOS#48508) chromium plugins: add meta.platforms (NixOS#48495) varnish6: 6.0.1 -> 6.1.0 (NixOS#48487) erlangR21: 21.0 -> 21.1.1 (NixOS#47371) varnish4: 4.1.9 -> 4.1.10 (NixOS#48488) tmux: 2.7 -> 2.8 nixpart0.blivet: fix reference to selinux python modules blivet: fix reference to selinux python modules magit-filenotify: Fix missing dependency on git ...
@edolstra is it a question of data locality, so that the script can evolve at the same pace as NixOS? Personally I don't tend to make a big distinction between both as they are in the same repo and have the same release schedule. NixOS is just another type of (albeit complex) derivation output. |
I would even say it is a complex derivation. |
@zimbatm At first I agreed with the idea that it'd be nice to have So it'd require, to make sense, to either add a Now, maybe a NixOS overlay to nixpkgs could be done, containing these? That'd solve both issues, with both the scripts as actual packages and packages in |
A few use case for non-NixOS users might be:
|
I talked with Eelco a bit and his main objection was to move the scripts outside of the nixos folder. It's a data locality problem. After NixCon I'll do another attempt where the packages are in pkgs/ but leaving the scripts in the nixos/ folder. And only port the ones that have an actual use-case. |
I talked with Eelco a bit and his main objection was to move the scripts outside of the nixos folder. It's a data locality problem.
After NixCon I'll do another attempt where the packages are in pkgs/ but leaving the scripts in the nixos/ folder. And only port the ones that have an actual use-case.
Hmm… why not a nixos overlay put in the `nixos/` folder and enabled by
default on NixOS but pick-able on-demand on other systems? That would
sound like it'd also solve all the problems caused by `nixos-*` tools
not being packaged, to me
|
I think that can be achieved by using |
|
I'm currently installing nix onto my second hard drive from Ubuntu. I got the drive partitioned and the filesystems mounted, but then I was surprised to find that |
If you have USB port/stick, use dd the image to that. You can also use an kexec image that can drop you into a installer from your existing Linux: https://github.com/nix-community/nixos-generators You can still get $(nix-build -E 'with import <nixpkgs> {}; (nixos {}).nixos-generate-config')/bin/nixos-generate-config |
Thanks for the tips, I didn't know about kexec I'll have to learn about that one. So |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/why-is-nixos-rebuild-an-output-attribute-of-a-nixos-system/9904/2 |
Motivation for this change
Move the nixos-rebuild script from the nixos distribution into the
package set.
This allows non-nixos users to run the script as well. For example,
deploying a remote machine with:
If that idea is interesting, potentially move all the other nixos
commands to packages.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)