0c601b12bf
since we want to move away from docbook and having docbook manpages around is going to block further progress we have to translate the current nixos manpages from docbook it *something* else. mdoc seems the most appropriate choice since markdown can't represent all the things manpages can differentiate with even more extensions. if we ever need html manpages we can render them using troff, like many of the online manpage viewers, or rewrite them again. since we haven't had html manpages for any of these in many years that seems unlikely to happen. unlike most of the recent markdown conversions this comes with a lot of minor rendering changes, mostly in spacing. docbook-xslt creates manual pages in a very different dialect than mdoc (which is used here).
110 lines
2.6 KiB
Groff
110 lines
2.6 KiB
Groff
.Dd January 1, 1980
|
|
.\" nixpkgs groff will use Nixpkgs as the OS in the title by default, taking it from
|
|
.\" doc-default-operating-system. mandoc doesn't have this register set by default,
|
|
.\" so we can use it as a groff/mandoc switch.
|
|
.ie ddoc-default-operating-system .Dt nixos-build-vms \&8 "NixOS System Manager's Manual"
|
|
.el .Dt nixos-build-vms 8
|
|
.Os NixOS
|
|
.Sh NAME
|
|
.Nm nixos-build-vms
|
|
.Nd build a network of virtual machines from a network of NixOS configurations
|
|
.
|
|
.
|
|
.
|
|
.Sh SYNOPSIS
|
|
.Nm nixos-build-vms
|
|
.Op Fl -show-trace
|
|
.Op Fl -no-out-link
|
|
.Op Fl -help
|
|
.Op Fl -option Ar name value
|
|
.Pa network.nix
|
|
.
|
|
.
|
|
.
|
|
.Sh DESCRIPTION
|
|
.
|
|
This command builds a network of QEMU\-KVM virtual machines of a Nix expression
|
|
specifying a network of NixOS machines. The virtual network can be started by
|
|
executing the
|
|
.Pa bin/run-vms
|
|
shell script that is generated by this command. By default, a
|
|
.Pa result
|
|
symlink is produced that points to the generated virtual network.
|
|
.
|
|
.Pp
|
|
A network Nix expression has the following structure:
|
|
.Bd -literal -offset indent
|
|
{
|
|
test1 = {pkgs, config, ...}:
|
|
{
|
|
services.openssh.enable = true;
|
|
nixpkgs.localSystem.system = "i686-linux";
|
|
deployment.targetHost = "test1.example.net";
|
|
|
|
# Other NixOS options
|
|
};
|
|
|
|
test2 = {pkgs, config, ...}:
|
|
{
|
|
services.openssh.enable = true;
|
|
services.httpd.enable = true;
|
|
environment.systemPackages = [ pkgs.lynx ];
|
|
nixpkgs.localSystem.system = "x86_64-linux";
|
|
deployment.targetHost = "test2.example.net";
|
|
|
|
# Other NixOS options
|
|
};
|
|
}
|
|
.Ed
|
|
.
|
|
.Pp
|
|
Each attribute in the expression represents a machine in the network
|
|
.Ns (e.g.
|
|
.Va test1
|
|
and
|
|
.Va test2 Ns
|
|
) referring to a function defining a NixOS configuration. In each NixOS
|
|
configuration, two attributes have a special meaning. The
|
|
.Va deployment.targetHost
|
|
specifies the address (domain name or IP address) of the system which is used by
|
|
.Ic ssh
|
|
to perform remote deployment operations. The
|
|
.Va nixpkgs.localSystem.system
|
|
attribute can be used to specify an architecture for the target machine, such as
|
|
.Ql i686-linux
|
|
which builds a 32-bit NixOS configuration. Omitting this property will build the
|
|
configuration for the same architecture as the host system.
|
|
.
|
|
.
|
|
.
|
|
.Sh OPTIONS
|
|
.Bl -tag -width indent
|
|
.It Fl -show-trace
|
|
Shows a trace of the output.
|
|
.
|
|
.It Fl -no-out-link
|
|
Do not create a
|
|
.Pa result
|
|
symlink.
|
|
.
|
|
.It Fl h , -help
|
|
Shows the usage of this command to the user.
|
|
.
|
|
.It Fl -option Ar name Va value
|
|
Set the Nix configuration option
|
|
.Va name
|
|
to
|
|
.Va value Ns
|
|
\&. This overrides settings in the Nix configuration file (see
|
|
.Xr nix.conf 5 Ns
|
|
).
|
|
.El
|
|
.
|
|
.
|
|
.
|
|
.Sh AUTHORS
|
|
.An -nosplit
|
|
.An Eelco Dolstra
|
|
and
|
|
.An the Nixpkgs/NixOS contributors
|