Skip to content

Commit 0e954df

Browse files
committed
doc: minor improvements
1 parent 28a6003 commit 0e954df

File tree

3 files changed

+26
-12
lines changed

3 files changed

+26
-12
lines changed

doc/src/SUMMARY.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77
- [Shared directories](./shares.md)
88
- [CPU emulation](./cpu-emulation.md)
99
- [Output options](./output-options.md)
10-
- [MicroVM options reference](./microvm-options.md)
10+
- [MicroVM options reference 󰒓](./microvm-options.md)
1111
- [Running a MicroVM as a package](./packages.md)
1212
- [Preparing a host for declarative MicroVMs](./host.md)
1313
- [A simple network setup](./simple-network.md)
1414
- [Advanced network setup](./advanced-network.md)
1515
- [Host systemd services](./host-systemd.md)
16-
- [Host options reference](./host-options.md)
16+
- [Host options reference 󰣖](./host-options.md)
1717
- [Declarative MicroVMs](./declarative.md)
1818
- [Imperative MicroVM management](./microvm-command.md)
1919
- [Deploy via SSH](./ssh-deploy.md)
2020
- [Conventions](./conventions.md)
2121
- [Frequently Asked Questions](./faq.md)
22+
23+
[⮜ Github: microvm.nix](https://github.com/astro/microvm.nix)

nixos-modules/host/options.nix

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
type = types.bool;
1515
default = false;
1616
description = ''
17-
Enable if all your MicroVMs run with a Hypervisor that sends readiness notification over a VSOCK.
17+
Enable if all your MicroVMs run with a Hypervisor that sends
18+
readiness notification over a VSOCK.
1819
19-
If one of your MicroVMs doesn't do this, its systemd service
20-
will not start up successfully.
20+
**Danger!** If one of your MicroVMs doesn't do this, its
21+
systemd service will not start up successfully!
2122
'';
2223
};
2324

@@ -32,8 +33,8 @@
3233
`systemd.services."microvm-tap-interfaces@%i.service".enable = false`
3334
'';
3435
example = ''
35-
# Attach tap interface to bridge br0, and set it up
36-
''${pkgs.iproute2}/bin/ip link set $id master br0 up
36+
# Attach tap interface to bridge br0, and bring it up
37+
''${pkgs.iproute2}/bin/ip link set "$id" master br0 up
3738
'';
3839
type = types.lines;
3940
};
@@ -74,8 +75,11 @@
7475
default = if config.pkgs != null then config.pkgs.path else pkgs.path;
7576
defaultText = literalExpression "pkgs.path";
7677
description = ''
77-
This option is only respected when `config` is specified.
78-
The nixpkgs path to use for the MicroVM. Defaults to the host's nixpkgs.
78+
This option is only respected when `config` is
79+
specified.
80+
81+
The nixpkgs path to use for the MicroVM. Defaults to the
82+
host's nixpkgs.
7983
'';
8084
};
8185

@@ -85,7 +89,11 @@
8589
defaultText = literalExpression "pkgs";
8690
description = ''
8791
This option is only respected when `config` is specified.
88-
The package set to use for the MicroVM. Must be a nixpkgs package set with the microvm overlay. Determines the system of the MicroVM.
92+
93+
The package set to use for the MicroVM. Must be a
94+
nixpkgs package set with the microvm overlay. Determines
95+
the system of the MicroVM.
96+
8997
If set to null, a new package set will be instantiated.
9098
'';
9199
};
@@ -95,6 +103,7 @@
95103
default = {};
96104
description = ''
97105
This option is only respected when `config` is specified.
106+
98107
A set of special arguments to be passed to NixOS modules.
99108
This will be merged into the `specialArgs` used to evaluate
100109
the NixOS configurations.
@@ -105,12 +114,14 @@
105114
description = "Source flake for declarative build";
106115
type = nullOr path;
107116
default = null;
117+
defaultText = literalExpression ''flakeInputs.my-infra'';
108118
};
109119

110120
updateFlake = mkOption {
111-
description = "Source flake to store for later imperative update";
121+
description = "Source flakeref to store for later imperative update";
112122
type = nullOr str;
113123
default = null;
124+
defaultText = literalExpression ''"git+file:///home/user/my-infra"'';
114125
};
115126

116127
autostart = mkOption {

nixos-modules/microvm/options.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ let
55
};
66

77
hostName = config.networking.hostName or "$HOSTNAME";
8+
89
in
910
{
1011
options.microvm = with lib; {
@@ -57,7 +58,7 @@ in
5758
};
5859

5960
kernel = mkOption {
60-
description = "Kernel package to use for MicroVM runners";
61+
description = "Kernel package to use for MicroVM runners. Better set `boot.kernelPackages` instead.";
6162
default = config.boot.kernelPackages.kernel;
6263
defaultText = literalExpression ''"''${config.boot.kernelPackages.kernel}"'';
6364
type = types.package;

0 commit comments

Comments
 (0)