ca0c460406
This commit adds the options --build-host and --target-host to nixos-rebuild. --build-host instructs nixos-rebuild to perform all nix builds on the specified host (via ssh). Build results are then copied back to the local machine and used when activating the system. --build-target instructs nixos-rebuild to activate the configuration not on the local machine but on the specified remote host. Build results are copied to the target machine and then activated there (via ssh). It is possible to combine the usage of --build-host and --target-host, in which case you can perform the build on one remote machine and deploy the configuration to another remote machine. The only requirement is that the build host has a working ssh connection to the target host (if the target is not local), and that the local machine can connect to both the target and the build host. Also, your user must be allowed to copy nix closures between the local machine and the target and host machines. At no point in time are the configuration sources (the nix files) copied anywhere. Instead, nix evaluation always happens locally (with nix-instantiate). The drv-file is then copied and realised remotely (with nix-store). As a convenience, if only --target-host is specified, --build-host is implicitly set to that host too. So if you want to build locally and deploy remotely you have to explicitly set "--build-host localhost". To activate (test, boot or switch) you need to have root access to the target host. You can specify this by "--target-host root@myhost". I have tested the obvious scenarios and they are working. Some of the combinations of --build-host and --target-host and the various actions might not make much sense, and should maybe be forbidden (like setting a remote target host when building a VM), and some combinations might not work at all. |
||
---|---|---|
doc | ||
lib | ||
maintainers | ||
nixos | ||
pkgs | ||
.gitignore | ||
.mention-bot | ||
.travis.yml | ||
.version | ||
CONTRIBUTING.md | ||
COPYING | ||
default.nix | ||
README.md |
Nixpkgs is a collection of packages for the Nix package manager. It is periodically built and tested by the hydra build daemon as so-called channels. To get channel information via git, add nixpkgs-channels as a remote:
% git remote add channels git://github.com/NixOS/nixpkgs-channels.git
For stability and maximum binary package support, it is recommended to maintain
custom changes on top of one of the channels, e.g. nixos-15.09
for the latest
release and nixos-unstable
for the latest successful build of master:
% git remote update channels
% git rebase channels/nixos-15.09
For pull-requests, please rebase onto nixpkgs master
.
NixOS linux distribution source code is located inside
nixos/
folder.
- NixOS installation instructions
- Documentation (Nix Expression Language chapter)
- Manual (How to write packages for Nix)
- Manual (NixOS)
- Nix Wiki
- Continuous package builds for unstable/master
- Continuous package builds for 15.09 release
- Tests for unstable/master
- Tests for 15.09 release
Communication: