mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
nixos-rebuild: allow to override builders
Since nix 2.0 the no-build-hook option was replaced by the builders options that allows to override remote builders ad-hoc. Since it is useful to disable remote builders updating nixos without network, this commit reintroduces the option.
This commit is contained in:
parent
5ef8b40d4d
commit
e40bfa4d85
@ -13,35 +13,35 @@
|
|||||||
</refnamediv>
|
</refnamediv>
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nixos-rebuild</command><group choice='req'>
|
<command>nixos-rebuild</command><group choice='req'>
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>switch</option>
|
<option>switch</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>boot</option>
|
<option>boot</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>test</option>
|
<option>test</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>build</option>
|
<option>build</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>dry-build</option>
|
<option>dry-build</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>dry-activate</option>
|
<option>dry-activate</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>build-vm</option>
|
<option>build-vm</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>build-vm-with-bootloader</option>
|
<option>build-vm-with-bootloader</option>
|
||||||
</arg>
|
</arg>
|
||||||
@ -50,29 +50,33 @@
|
|||||||
<arg>
|
<arg>
|
||||||
<option>--upgrade</option>
|
<option>--upgrade</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
<option>--install-bootloader</option>
|
<option>--install-bootloader</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
<option>--no-build-nix</option>
|
<option>--no-build-nix</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
<option>--fast</option>
|
<option>--fast</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg>
|
<arg>
|
||||||
<option>--rollback</option>
|
<option>--rollback</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
<arg>
|
||||||
|
<option>--builders</option>
|
||||||
|
<replaceable>builder-spec</replaceable>
|
||||||
|
</arg>
|
||||||
<sbr />
|
<sbr />
|
||||||
<arg>
|
<arg>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>--profile-name</option>
|
<option>--profile-name</option>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<option>-p</option>
|
<option>-p</option>
|
||||||
</arg>
|
</arg>
|
||||||
@ -315,6 +319,27 @@ $ ./result/bin/run-*-vm
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<option>--builders</option>
|
||||||
|
<replaceable>builder-spec</replaceable>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Allow to specify remote builders ad-hoc for building the new system.
|
||||||
|
This requires the user executing <command>nixos-rebuild</command> (usually
|
||||||
|
root) to be configured as a trusted user in the Nix daemon. This can be
|
||||||
|
achived by using the <literal>nix.trustedUsers</literal> NixOS option.
|
||||||
|
Examples values for that option are described in the
|
||||||
|
<literal>Remote builds chapter<literal> in the Nix manual,
|
||||||
|
(i.e. <command>--builders "ssh://bigbrother x86_64-linux"</command>).
|
||||||
|
By specifying an empty string existing builders specified in
|
||||||
|
<filename>/etc/nix/machines</filename> can be ignored:
|
||||||
|
<command>--builders ""</command> for example when they are not
|
||||||
|
reachable due to network connectivity.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<option>--profile-name</option>
|
<option>--profile-name</option>
|
||||||
|
@ -53,11 +53,11 @@ while [ "$#" -gt 0 ]; do
|
|||||||
repair=1
|
repair=1
|
||||||
extraBuildFlags+=("$i")
|
extraBuildFlags+=("$i")
|
||||||
;;
|
;;
|
||||||
--max-jobs|-j|--cores|-I)
|
--max-jobs|-j|--cores|-I|--builders)
|
||||||
j="$1"; shift 1
|
j="$1"; shift 1
|
||||||
extraBuildFlags+=("$i" "$j")
|
extraBuildFlags+=("$i" "$j")
|
||||||
;;
|
;;
|
||||||
--show-trace|--no-build-hook|--keep-failed|-K|--keep-going|-k|--verbose|-v|-vv|-vvv|-vvvv|-vvvvv|--fallback|--repair|--no-build-output|-Q|-j*)
|
--show-trace|--keep-failed|-K|--keep-going|-k|--verbose|-v|-vv|-vvv|-vvvv|-vvvvv|--fallback|--repair|--no-build-output|-Q|-j*)
|
||||||
extraBuildFlags+=("$i")
|
extraBuildFlags+=("$i")
|
||||||
;;
|
;;
|
||||||
--option)
|
--option)
|
||||||
|
Loading…
Reference in New Issue
Block a user