Skip to content

Commit 4e6a9f0

Browse files
committedJan 7, 2018
Merge remote-tracking branch 'upstream/master' into HEAD
2 parents 175d890 + cde9585 commit 4e6a9f0

File tree

49 files changed

+673
-322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+673
-322
lines changed
 

‎nixos/doc/manual/development/writing-nixos-tests.xml

+29
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,37 @@ startAll;
272272
</listitem>
273273
</varlistentry>
274274

275+
<varlistentry>
276+
<term><methodname>systemctl</methodname></term>
277+
<listitem>
278+
<para>Runs <literal>systemctl</literal> commands with optional support for
279+
<literal>systemctl --user</literal></para>
280+
<para>
281+
<programlisting>
282+
$machine->systemctl("list-jobs --no-pager"); // runs `systemctl list-jobs --no-pager`
283+
$machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager`
284+
</programlisting>
285+
</para>
286+
</listitem>
287+
</varlistentry>
288+
275289
</variablelist>
276290

277291
</para>
278292

293+
<para>
294+
To test user units declared by <literal>systemd.user.services</literal> the optional <literal>$user</literal>
295+
argument can be used:
296+
297+
<programlisting>
298+
$machine->start;
299+
$machine->waitForX;
300+
$machine->waitForUnit("xautolock.service", "x-session-user");
301+
</programlisting>
302+
303+
This applies to <literal>systemctl</literal>, <literal>getUnitInfo</literal>,
304+
<literal>waitForUnit</literal>, <literal>startJob</literal>
305+
and <literal>stopJob</literal>.
306+
</para>
307+
279308
</section>

‎nixos/doc/manual/installation/installing-usb.xml

+17-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,24 @@ a USB stick. You can use the <command>dd</command> utility to write the image:
1111
<command>dd if=<replaceable>path-to-image</replaceable>
1212
of=<replaceable>/dev/sdb</replaceable></command>. Be careful about specifying the
1313
correct drive; you can use the <command>lsblk</command> command to get a list of
14-
block devices. If you're on macOS you can run <command>diskutil list</command>
15-
to see the list of devices; the device you'll use for the USB must be ejected
16-
before writing the image.</para>
14+
block devices.</para>
1715

16+
<para>On macOS:
17+
<programlisting>
18+
$ diskutil list
19+
[..]
20+
/dev/diskN (external, physical):
21+
#: TYPE NAME SIZE IDENTIFIER
22+
[..]
23+
$ diskutil unmountDisk diskN
24+
Unmount of all volumes on diskN was successful
25+
$ sudo dd bs=1m if=nix.iso of=/dev/rdiskN
26+
</programlisting>
27+
Using the 'raw' <command>rdiskN</command> device instead of <command>diskN</command>
28+
completes in minutes instead of hours. After <command>dd</command> completes, a GUI
29+
dialog "The disk you inserted was not readable by this computer" will pop up, which
30+
can be ignored.</para>
31+
1832
<para>The <command>dd</command> utility will write the image verbatim to the drive,
1933
making it the recommended option for both UEFI and non-UEFI installations. For
2034
non-UEFI installations, you can alternatively use

0 commit comments

Comments
 (0)