git.iko.soy/typeable/nixpkgs
on master help sign in
Merge master into staging-next
commit41377252e53a78bd8903a4f3e0e35714e20f6147 authorFrederik Rietdijk <fridh@fridh.nl> dateTue 18 Jun 2019, 10:53 (7 years ago) parent0aa9f3551ef6ac
75 files changed+761−747
doc/coding-conventions.xml+5−5 doc/contributing.xml+7−7 doc/functions/appimagetools.xml+1−1 doc/functions/dockertools.xml+10−10 doc/functions/prefer-remote-fetch.xml+9−9 doc/functions/trivial-builders.xml+13−13 doc/languages-frameworks/beam.xml+127−127 doc/languages-frameworks/go.xml+4−4 doc/languages-frameworks/java.xml+1−1 doc/languages-frameworks/lua.xml+1−1 doc/languages-frameworks/ocaml.xml+2−2 doc/languages-frameworks/perl.xml+4−4 doc/languages-frameworks/texlive.xml+2−2 doc/meta.xml+2−2 doc/package-notes.xml+9−9 doc/platform-notes.xml+35−35 doc/quick-start.xml+8−8 doc/reviewing-contributions.xml+5−5 doc/stdenv.xml+13−13 doc/submitting-changes.xml+3−3 nixos/doc/manual/administration/cleaning-store.xml+5−5 nixos/doc/manual/administration/container-networking.xml+2−2 nixos/doc/manual/administration/control-groups.xml+1−1 nixos/doc/manual/administration/logging.xml+3−3 nixos/doc/manual/administration/rollback.xml+1−1 nixos/doc/manual/administration/service-mgmt.xml+2−2 nixos/doc/manual/administration/store-corruption.xml+2−2 nixos/doc/manual/administration/user-sessions.xml+2−2 nixos/doc/manual/configuration/ad-hoc-packages.xml+5−5 nixos/doc/manual/configuration/adding-custom-packages.xml+4−4 nixos/doc/manual/configuration/declarative-packages.xml+1−1 nixos/doc/manual/configuration/matrix.xml+94−94 nixos/doc/manual/configuration/modularity.xml+14−14 nixos/doc/manual/configuration/profiles.xml+1−1 nixos/doc/manual/configuration/user-mgmt.xml+1−1 nixos/doc/manual/configuration/wireless.xml+3−3 nixos/doc/manual/configuration/xfce.xml+6−6 nixos/doc/manual/development/building-nixos.xml+4−4 nixos/doc/manual/development/building-parts.xml+10−10 nixos/doc/manual/development/running-nixos-tests-interactively.xml+9−9 nixos/doc/manual/development/running-nixos-tests.xml+4−4 nixos/doc/manual/development/sources.xml+12−12 nixos/doc/manual/development/testing-installer.xml+6−6 nixos/doc/manual/development/writing-nixos-tests.xml+7−7 nixos/doc/manual/installation/changing-config.xml+14−9 nixos/doc/manual/installation/installing-from-other-distro.xml+23−22 nixos/doc/manual/installation/installing-usb.xml+5−5 nixos/doc/manual/installation/installing.xml+44−44 nixos/doc/manual/man-nixos-generate-config.xml+5−5 nixos/doc/manual/man-nixos-install.xml+19−19 nixos/doc/manual/man-nixos-option.xml+6−6 nixos/doc/manual/man-nixos-rebuild.xml+20−20 nixos/doc/manual/release-notes/rl-1509.xml+1−1 nixos/doc/manual/release-notes/rl-1703.xml+8−8 nixos/modules/services/databases/foundationdb.xml+19−19 nixos/modules/services/databases/postgresql.xml+2−2 nixos/modules/services/desktops/flatpak.xml+11−11 nixos/modules/services/editors/emacs.xml+5−5 nixos/modules/services/misc/gitlab.xml+6−6 nixos/modules/services/misc/taskserver/doc.xml+1−1 nixos/modules/services/monitoring/prometheus/exporters.xml+55−55 nixos/modules/services/network-filesystems/samba.nix+4−4 nixos/modules/services/networking/dnscrypt-proxy.xml+4−4 nixos/modules/services/networking/smokeping.nix+11−11 nixos/modules/services/web-apps/matomo-doc.xml+11−11 pkgs/development/coq-modules/bignums/default.nix+4 pkgs/development/coq-modules/coqprime/default.nix+1 pkgs/development/interpreters/gauche/default.nix+2−2 pkgs/development/python-modules/micawber/default.nix+2−2 pkgs/development/python-modules/plotly/default.nix+2−2 pkgs/development/python-modules/poetry/default.nix+2−2 pkgs/development/tools/build-managers/buck/default.nix+4−4 pkgs/development/tools/misc/fswatch/default.nix+2−1 pkgs/development/tools/rust/cargo-make/default.nix+5−5 pkgs/top-level/all-packages.nix+3−1
doc/coding-conventions.xml+5−5
@@ -921,7 +921,7 @@ src = fetchFromGitHub {
921921 <para>
922922 You can convert between formats with nix-hash, for example:
923923<screen>
924−$ nix-hash --type sha256 --to-base32 <replaceable>HASH</replaceable>
924+<prompt>$ </prompt>nix-hash --type sha256 --to-base32 <replaceable>HASH</replaceable>
925925</screen>
926926 </para>
927927 </listitem>
@@ -1038,7 +1038,7 @@ patches = [ ./0001-changes.patch ];
10381038 <para>
10391039 Move to the root directory of the source code you're patching.
10401040<screen>
1041−$ cd the/program/source</screen>
1041+<prompt>$ </prompt>cd the/program/source</screen>
10421042 </para>
10431043 </listitem>
10441044 <listitem>
@@ -1046,8 +1046,8 @@ $ cd the/program/source</screen>
10461046 If a git repository is not already present, create one and stage all of
10471047 the source files.
10481048<screen>
1049−$ git init
1050−$ git add .</screen>
1049+<prompt>$ </prompt>git init
1050+<prompt>$ </prompt>git add .</screen>
10511051 </para>
10521052 </listitem>
10531053 <listitem>
@@ -1060,7 +1060,7 @@ $ git add .</screen>
10601060 <para>
10611061 Use git to create a diff, and pipe the output to a patch file:
10621062<screen>
1063−$ git diff > nixpkgs/pkgs/the/package/0001-changes.patch</screen>
1063+<prompt>$ </prompt>git diff > nixpkgs/pkgs/the/package/0001-changes.patch</screen>
10641064 </para>
10651065 </listitem>
10661066 </orderedlist>
doc/contributing.xml+7−7
@@ -12,9 +12,9 @@ xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc</filename>
1212 You can quickly check your edits with <command>make</command>:
1313 </para>
1414<screen>
15− $ cd /path/to/nixpkgs/doc
16− $ nix-shell
17− [nix-shell]$ make
15+<prompt>$ </prompt>cd /path/to/nixpkgs/doc
16+<prompt>$ </prompt>nix-shell
17+<prompt>[nix-shell]$ </prompt>make
1818</screen>
1919 <para>
2020 If you experience problems, run <command>make debug</command> to help
@@ -24,10 +24,10 @@ xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc</filename>
2424 After making modifications to the manual, it's important to build it before
2525 committing. You can do that as follows:
2626<screen>
27− $ cd /path/to/nixpkgs/doc
28− $ nix-shell
29− [nix-shell]$ make clean
30− [nix-shell]$ nix-build .
27+<prompt>$ </prompt>cd /path/to/nixpkgs/doc
28+<prompt>$ </prompt>nix-shell
29+<prompt>[nix-shell]$ </prompt>make clean
30+<prompt>[nix-shell]$ </prompt>nix-build .
3131</screen>
3232 If the build succeeds, the manual will be in
3333 <filename>./result/share/doc/nixpkgs/manual.html</filename>.
doc/functions/appimagetools.xml+1−1
@@ -52,7 +52,7 @@ spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: off
5252
5353<prompt>$ </prompt>file -k type2.AppImage
5454type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x), scale 232-60668, spot sensor temperature -4.187500, color scheme 15, show scale bar, calibration: offset -0.000000, slope 0.000000 (Lepton 2.x), scale 4111-45000, spot sensor temperature 412442.250000, color scheme 3, minimum point enabled, calibration: offset -75402534979642766821519867692934234112.000000, slope 5815371847733706829839455140374904832.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79dcc4e55a61c293c5e19edbd8d65b202842579f, stripped\012- data
55− </screen>
55+</screen>
5656
5757 <para>
5858 Note how the type 1 AppImage is described as an <literal>ISO 9660 CD-ROM
doc/functions/dockertools.xml+10−10
@@ -480,9 +480,9 @@ pullImage {
480480 <literal>nix-prefetch-docker</literal> command can be used to get required
481481 image parameters:
482482
483−<programlisting>
484−$ nix run nixpkgs.nix-prefetch-docker -c nix-prefetch-docker --image-name mysql --image-tag 5
485−</programlisting>
483+<screen>
484+<prompt>$ </prompt>nix run nixpkgs.nix-prefetch-docker -c nix-prefetch-docker --image-name mysql --image-tag 5
485+</screen>
486486
487487 Since a given <varname>imageName</varname> may transparently refer to a
488488 manifest list of images which support multiple architectures and/or
@@ -491,17 +491,17 @@ $ nix run nixpkgs.nix-prefetch-docker -c nix-prefetch-docker --image-name mysql
491491 By default it will match the OS and architecture of the host the command is
492492 run on.
493493
494−<programlisting>
495−$ nix-prefetch-docker --image-name mysql --image-tag 5 --arch x86_64 --os linux
496−</programlisting>
494+<screen>
495+<prompt>$ </prompt>nix-prefetch-docker --image-name mysql --image-tag 5 --arch x86_64 --os linux
496+</screen>
497497
498498 Desired image name and tag can be set using
499499 <option>--final-image-name</option> and <option>--final-image-tag</option>
500500 arguments:
501501
502−<programlisting>
503−$ nix-prefetch-docker --image-name mysql --image-tag 5 --final-image-name eu.gcr.io/my-project/mysql --final-image-tag prod
504−</programlisting>
502+<screen>
503+<prompt>$ </prompt>nix-prefetch-docker --image-name mysql --image-tag 5 --final-image-name eu.gcr.io/my-project/mysql --final-image-tag prod
504+</screen>
505505 </para>
506506 </section>
507507
@@ -537,7 +537,7 @@ exportImage {
537537
538538 name = someLayeredImage.name;
539539}
540− </programlisting>
540+</programlisting>
541541 </example>
542542
543543 <para>
doc/functions/prefer-remote-fetch.xml+9−9
@@ -10,16 +10,16 @@
1010 upload while the builder can fetch faster directly from the source. To use
1111 it, put the following snippet as a new overlay:
1212<programlisting>
13− self: super:
14− (super.prefer-remote-fetch self super)
15− </programlisting>
13+self: super:
14+ (super.prefer-remote-fetch self super)
15+</programlisting>
1616 A full configuration example for that sets the overlay up for your own
1717 account, could look like this
18−<programlisting>
19− $ mkdir ~/.config/nixpkgs/overlays/
20− $ cat &gt; ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix &lt;&lt;EOF
21− self: super: super.prefer-remote-fetch self super
22− EOF
23− </programlisting>
18+<screen>
19+<prompt>$ </prompt>mkdir ~/.config/nixpkgs/overlays/
20+<prompt>$ </prompt>cat &gt; ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix &lt;&lt;EOF
21+ self: super: super.prefer-remote-fetch self super
22+EOF
23+</screen>
2424 </para>
2525</section>
doc/functions/trivial-builders.xml+13−13
@@ -35,25 +35,25 @@
3535 An example of using <literal>runCommand</literal> is provided below.
3636 </para>
3737<programlisting>
38− (import &lt;nixpkgs&gt; {}).runCommand "my-example" {} ''
39− echo My example command is running
38+(import &lt;nixpkgs&gt; {}).runCommand "my-example" {} ''
39+ echo My example command is running
4040
41− mkdir $out
41+ mkdir $out
4242
43− echo I can write data to the Nix store > $out/message
43+ echo I can write data to the Nix store > $out/message
4444
45− echo I can also run basic commands like:
45+ echo I can also run basic commands like:
4646
47− echo ls
48− ls
47+ echo ls
48+ ls
4949
50− echo whoami
51− whoami
50+ echo whoami
51+ whoami
5252
53− echo date
54− date
55− ''
56− </programlisting>
53+ echo date
54+ date
55+''
56+</programlisting>
5757 </listitem>
5858 </varlistentry>
5959 <varlistentry>
doc/languages-frameworks/beam.xml+127−127
@@ -131,8 +131,8 @@
131131 in <literal>beamPackages</literal>, use the following command:
132132 </para>
133133
134−<programlisting>
135−$ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -qaP -A beamPackages
134+<screen>
135+<prompt>$ </prompt>nix-env -f &quot;&lt;nixpkgs&gt;&quot; -qaP -A beamPackages
136136beamPackages.esqlite esqlite-0.2.1
137137beamPackages.goldrush goldrush-0.1.7
138138beamPackages.ibrowse ibrowse-4.2.2
@@ -140,16 +140,16 @@ beamPackages.jiffy jiffy-0.14.5
140140beamPackages.lager lager-3.0.2
141141beamPackages.meck meck-0.8.3
142142beamPackages.rebar3-pc pc-1.1.0
143− </programlisting>
143+</screen>
144144
145145 <para>
146146 To install any of those packages into your profile, refer to them by their
147147 attribute path (first column):
148148 </para>
149149
150−<programlisting>
151−$ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.ibrowse
152− </programlisting>
150+<screen>
151+<prompt>$ </prompt>nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.ibrowse
152+</screen>
153153
154154 <para>
155155 The attribute path of any BEAM package corresponds to the name of that
@@ -178,22 +178,22 @@ $ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.ibrowse
178178 </para>
179179
180180<programlisting>
181− { stdenv, fetchFromGitHub, buildRebar3, ibrowse, jsx, erlware_commons }:
181+{ stdenv, fetchFromGitHub, buildRebar3, ibrowse, jsx, erlware_commons }:
182182
183− buildRebar3 rec {
184− name = "hex2nix";
185− version = "0.0.1";
183+buildRebar3 rec {
184+ name = "hex2nix";
185+ version = "0.0.1";
186186
187− src = fetchFromGitHub {
188− owner = "ericbmerritt";
189− repo = "hex2nix";
190− rev = "${version}";
191− sha256 = "1w7xjidz1l5yjmhlplfx7kphmnpvqm67w99hd2m7kdixwdxq0zqg";
192− };
187+ src = fetchFromGitHub {
188+ owner = "ericbmerritt";
189+ repo = "hex2nix";
190+ rev = "${version}";
191+ sha256 = "1w7xjidz1l5yjmhlplfx7kphmnpvqm67w99hd2m7kdixwdxq0zqg";
192+ };
193193
194− beamDeps = [ ibrowse jsx erlware_commons ];
195− }
196− </programlisting>
194+ beamDeps = [ ibrowse jsx erlware_commons ];
195+}
196+</programlisting>
197197
198198 <para>
199199 Such derivations are callable with
@@ -228,29 +228,29 @@ $ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.ibrowse
228228 </para>
229229
230230<programlisting>
231− { buildErlangMk, fetchHex, cowlib, ranch }:
232−
233− buildErlangMk {
234− name = "cowboy";
235− version = "1.0.4";
236−
237− src = fetchHex {
238− pkg = "cowboy";
239− version = "1.0.4";
240− sha256 = "6a0edee96885fae3a8dd0ac1f333538a42e807db638a9453064ccfdaa6b9fdac";
241− };
242−
243− beamDeps = [ cowlib ranch ];
244−
245− meta = {
246− description = ''
247− Small, fast, modular HTTP server written in Erlang
248− '';
249− license = stdenv.lib.licenses.isc;
250− homepage = https://github.com/ninenines/cowboy;
251− };
252− }
253− </programlisting>
231+{ buildErlangMk, fetchHex, cowlib, ranch }:
232+
233+buildErlangMk {
234+ name = "cowboy";
235+ version = "1.0.4";
236+
237+ src = fetchHex {
238+ pkg = "cowboy";
239+ version = "1.0.4";
240+ sha256 = "6a0edee96885fae3a8dd0ac1f333538a42e807db638a9453064ccfdaa6b9fdac";
241+ };
242+
243+ beamDeps = [ cowlib ranch ];
244+
245+ meta = {
246+ description = ''
247+ Small, fast, modular HTTP server written in Erlang
248+ '';
249+ license = stdenv.lib.licenses.isc;
250+ homepage = https://github.com/ninenines/cowboy;
251+ };
252+}
253+</programlisting>
254254 </section>
255255
256256 <section xml:id="mix-packages">
@@ -262,56 +262,56 @@ $ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.ibrowse
262262 </para>
263263
264264<programlisting>
265− { buildMix, fetchHex, plug, absinthe }:
266−
267− buildMix {
268− name = "absinthe_plug";
269− version = "1.0.0";
270−
271− src = fetchHex {
272− pkg = "absinthe_plug";
273− version = "1.0.0";
274− sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33";
275− };
276−
277− beamDeps = [ plug absinthe ];
278−
279− meta = {
280− description = ''
281− A plug for Absinthe, an experimental GraphQL toolkit
282− '';
283− license = stdenv.lib.licenses.bsd3;
284− homepage = https://github.com/CargoSense/absinthe_plug;
285− };
286− }
287− </programlisting>
265+{ buildMix, fetchHex, plug, absinthe }:
266+
267+buildMix {
268+ name = "absinthe_plug";
269+ version = "1.0.0";
270+
271+ src = fetchHex {
272+ pkg = "absinthe_plug";
273+ version = "1.0.0";
274+ sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33";
275+ };
276+
277+ beamDeps = [ plug absinthe ];
278+
279+ meta = {
280+ description = ''
281+ A plug for Absinthe, an experimental GraphQL toolkit
282+ '';
283+ license = stdenv.lib.licenses.bsd3;
284+ homepage = https://github.com/CargoSense/absinthe_plug;
285+ };
286+}
287+</programlisting>
288288
289289 <para>
290290 Alternatively, we can use <literal>buildHex</literal> as a shortcut:
291291 </para>
292292
293293<programlisting>
294− { buildHex, buildMix, plug, absinthe }:
294+{ buildHex, buildMix, plug, absinthe }:
295295
296− buildHex {
297− name = "absinthe_plug";
298− version = "1.0.0";
296+buildHex {
297+ name = "absinthe_plug";
298+ version = "1.0.0";
299299
300− sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33";
300+ sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33";
301301
302− builder = buildMix;
302+ builder = buildMix;
303303
304− beamDeps = [ plug absinthe ];
304+ beamDeps = [ plug absinthe ];
305305
306− meta = {
307− description = ''
308− A plug for Absinthe, an experimental GraphQL toolkit
309− '';
310− license = stdenv.lib.licenses.bsd3;
311− homepage = https://github.com/CargoSense/absinthe_plug;
312− };
313− }
314− </programlisting>
306+ meta = {
307+ description = ''
308+ A plug for Absinthe, an experimental GraphQL toolkit
309+ '';
310+ license = stdenv.lib.licenses.bsd3;
311+ homepage = https://github.com/CargoSense/absinthe_plug;
312+ };
313+}
314+</programlisting>
315315 </section>
316316 </section>
317317 </section>
@@ -330,47 +330,47 @@ $ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.ibrowse
330330 could do the following:
331331 </para>
332332
333−<programlisting>
334− $ nix-shell -A beamPackages.ibrowse.env --run "erl"
335− Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
336−
337− Eshell V7.0 (abort with ^G)
338− 1> m(ibrowse).
339− Module: ibrowse
340− MD5: 3b3e0137d0cbb28070146978a3392945
341− Compiled: January 10 2016, 23:34
342− Object file: /nix/store/g1rlf65rdgjs4abbyj4grp37ry7ywivj-ibrowse-4.2.2/lib/erlang/lib/ibrowse-4.2.2/ebin/ibrowse.beam
343− Compiler options: [{outdir,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/ebin"},
344− debug_info,debug_info,nowarn_shadow_vars,
345− warn_unused_import,warn_unused_vars,warnings_as_errors,
346− {i,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/include"}]
347− Exports:
348− add_config/1 send_req_direct/7
349− all_trace_off/0 set_dest/3
350− code_change/3 set_max_attempts/3
351− get_config_value/1 set_max_pipeline_size/3
352− get_config_value/2 set_max_sessions/3
353− get_metrics/0 show_dest_status/0
354− get_metrics/2 show_dest_status/1
355− handle_call/3 show_dest_status/2
356− handle_cast/2 spawn_link_worker_process/1
357− handle_info/2 spawn_link_worker_process/2
358− init/1 spawn_worker_process/1
359− module_info/0 spawn_worker_process/2
360− module_info/1 start/0
361− rescan_config/0 start_link/0
362− rescan_config/1 stop/0
363− send_req/3 stop_worker_process/1
364− send_req/4 stream_close/1
365− send_req/5 stream_next/1
366− send_req/6 terminate/2
367− send_req_direct/4 trace_off/0
368− send_req_direct/5 trace_off/2
369− send_req_direct/6 trace_on/0
370− trace_on/2
371− ok
372− 2>
373− </programlisting>
333+<screen>
334+<prompt>$ </prompt><userinput>nix-shell -A beamPackages.ibrowse.env --run "erl"</userinput>
335+<computeroutput>Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
336+
337+Eshell V7.0 (abort with ^G)</computeroutput>
338+<prompt>1> </prompt><userinput>m(ibrowse).</userinput>
339+<computeroutput>Module: ibrowse
340+MD5: 3b3e0137d0cbb28070146978a3392945
341+Compiled: January 10 2016, 23:34
342+Object file: /nix/store/g1rlf65rdgjs4abbyj4grp37ry7ywivj-ibrowse-4.2.2/lib/erlang/lib/ibrowse-4.2.2/ebin/ibrowse.beam
343+Compiler options: [{outdir,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/ebin"},
344+debug_info,debug_info,nowarn_shadow_vars,
345+warn_unused_import,warn_unused_vars,warnings_as_errors,
346+{i,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/include"}]
347+Exports:
348+add_config/1 send_req_direct/7
349+all_trace_off/0 set_dest/3
350+code_change/3 set_max_attempts/3
351+get_config_value/1 set_max_pipeline_size/3
352+get_config_value/2 set_max_sessions/3
353+get_metrics/0 show_dest_status/0
354+get_metrics/2 show_dest_status/1
355+handle_call/3 show_dest_status/2
356+handle_cast/2 spawn_link_worker_process/1
357+handle_info/2 spawn_link_worker_process/2
358+init/1 spawn_worker_process/1
359+module_info/0 spawn_worker_process/2
360+module_info/1 start/0
361+rescan_config/0 start_link/0
362+rescan_config/1 stop/0
363+send_req/3 stop_worker_process/1
364+send_req/4 stream_close/1
365+send_req/5 stream_next/1
366+send_req/6 terminate/2
367+send_req_direct/4 trace_off/0
368+send_req_direct/5 trace_off/2
369+send_req_direct/6 trace_on/0
370+trace_on/2
371+ok</computeroutput>
372+<prompt>2></prompt>
373+</screen>
374374
375375 <para>
376376 Notice the <literal>-A beamPackages.ibrowse.env</literal>. That is the key
@@ -408,7 +408,7 @@ let
408408in
409409
410410 drv
411− </programlisting>
411+</programlisting>
412412
413413 <section xml:id="building-in-a-shell">
414414 <title>Building in a Shell (for Mix Projects)</title>
@@ -474,7 +474,7 @@ plt:
474474analyze: build plt
475475 $(NIX_SHELL) --run "mix dialyzer --no-compile"
476476
477− </programlisting>
477+</programlisting>
478478
479479 <para>
480480 Using a <literal>shell.nix</literal> as described (see
@@ -513,9 +513,9 @@ analyze: build plt
513513 <literal>nixpkgs</literal> repository:
514514 </para>
515515
516−<programlisting>
517−$ nix-build -A beamPackages
518− </programlisting>
516+<screen>
517+<prompt>$ </prompt>nix-build -A beamPackages
518+</screen>
519519
520520 <para>
521521 That will attempt to build every package in <literal>beamPackages</literal>.
doc/languages-frameworks/go.xml+4−4
@@ -218,12 +218,12 @@ deis = buildGoPackage rec {
218218 <varname>bin</varname> includes program binaries. You can test build a Go
219219 binary as follows:
220220<screen>
221− $ nix-build -A deis.bin
222− </screen>
221+<prompt>$ </prompt>nix-build -A deis.bin
222+</screen>
223223 or build all outputs with:
224224<screen>
225− $ nix-build -A deis.all
226− </screen>
225+<prompt>$ </prompt>nix-build -A deis.all
226+</screen>
227227 <varname>bin</varname> output will be installed by default with
228228 <varname>nix-env -i</varname> or <varname>systemPackages</varname>.
229229 </para>
doc/languages-frameworks/java.xml+1−1
@@ -68,7 +68,7 @@ installPhase =
6868 can be done in a generic fashion with the <literal>--set</literal> argument
6969 of <literal>makeWrapper</literal>:
7070<programlisting>
71− --set JAVA_HOME ${jdk.home}
71+--set JAVA_HOME ${jdk.home}
7272</programlisting>
7373 </para>
7474
doc/languages-frameworks/lua.xml+1−1
@@ -29,7 +29,7 @@ fileSystem = buildLuaPackage {
2929 maintainers = with maintainers; [ flosse ];
3030 };
3131};
32− </programlisting>
32+</programlisting>
3333 </para>
3434
3535 <para>
doc/languages-frameworks/ocaml.xml+2−2
@@ -62,7 +62,7 @@ buildDunePackage rec {
6262 maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
6363 };
6464}
65− </programlisting>
65+</programlisting>
6666
6767 <para>
6868 Here is a second example, this time using a source archive generated with
@@ -93,5 +93,5 @@ buildDunePackage rec {
9393 maintainers = [ maintainers.eqyiel ];
9494 };
9595}
96− </programlisting>
96+</programlisting>
9797</section>
doc/languages-frameworks/perl.xml+4−4
@@ -47,13 +47,13 @@ foo = import ../path/to/foo.nix {
4747 in <filename>all-packages.nix</filename>. You can test building a Perl
4848 package as follows:
4949<screen>
50−$ nix-build -A perlPackages.ClassC3
50+<prompt>$ </prompt>nix-build -A perlPackages.ClassC3
5151</screen>
5252 <varname>buildPerlPackage</varname> adds <literal>perl-</literal> to the
5353 start of the name attribute, so the package above is actually called
5454 <literal>perl-Class-C3-0.21</literal>. So to install it, you can say:
5555<screen>
56−$ nix-env -i perl-Class-C3
56+<prompt>$ </prompt>nix-env -i perl-Class-C3
5757</screen>
5858 (Of course you can also install using the attribute name: <literal>nix-env -i
5959 -A perlPackages.ClassC3</literal>.)
@@ -148,7 +148,7 @@ ClassC3Componentised = buildPerlPackage rec {
148148 </para>
149149
150150<screen>
151−$ nix-env -i nix-generate-from-cpan
151+<prompt>$ </prompt>nix-env -i nix-generate-from-cpan
152152</screen>
153153
154154 <para>
@@ -156,7 +156,7 @@ $ nix-env -i nix-generate-from-cpan
156156 unpacks the corresponding package, and prints a Nix expression on standard
157157 output. For example:
158158<screen>
159−$ nix-generate-from-cpan XML::Simple
159+<prompt>$ </prompt>nix-generate-from-cpan XML::Simple
160160 XMLSimple = buildPerlPackage rec {
161161 name = "XML-Simple-2.22";
162162 src = fetchurl {
doc/languages-frameworks/texlive.xml+2−2
@@ -26,7 +26,7 @@
2626texlive.combine {
2727 inherit (texlive) scheme-small collection-langkorean algorithms cm-super;
2828}
29− </programlisting>
29+</programlisting>
3030 There are all the schemes, collections and a few thousand packages, as
3131 defined upstream (perhaps with tiny differences).
3232 </para>
@@ -44,7 +44,7 @@ texlive.combine {
4444 # elem tlType [ "run" "bin" "doc" "source" ]
4545 # there are also other attributes: version, name
4646}
47− </programlisting>
47+</programlisting>
4848 </para>
4949 </listitem>
5050 <listitem>
doc/meta.xml+2−2
@@ -30,7 +30,7 @@ meta = with stdenv.lib; {
3030 The meta-attributes of a package can be queried from the command-line using
3131 <command>nix-env</command>:
3232<screen>
33−$ nix-env -qa hello --json
33+<prompt>$ </prompt>nix-env -qa hello --json
3434{
3535 "hello": {
3636 "meta": {
@@ -70,7 +70,7 @@ $ nix-env -qa hello --json
7070 <command>nix-env</command> knows about the <varname>description</varname>
7171 field specifically:
7272<screen>
73−$ nix-env -qa hello --description
73+<prompt>$ </prompt>nix-env -qa hello --description
7474hello-2.3 A program that produces a familiar, friendly greeting
7575</screen>
7676 </para>
doc/package-notes.xml+9−9
@@ -92,9 +92,9 @@ modulesTree = [kernel]
9292 <para>
9393 If needed you can also run <literal>make menuconfig</literal>:
9494<screen>
95−$ nix-env -i ncurses
96−$ export NIX_CFLAGS_LINK=-lncurses
97−$ make menuconfig ARCH=<replaceable>arch</replaceable></screen>
95+<prompt>$ </prompt>nix-env -i ncurses
96+<prompt>$ </prompt>export NIX_CFLAGS_LINK=-lncurses
97+<prompt>$ </prompt>make menuconfig ARCH=<replaceable>arch</replaceable></screen>
9898 </para>
9999 </listitem>
100100 <listitem>
@@ -142,8 +142,8 @@ $ make menuconfig ARCH=<replaceable>arch</replaceable></screen>
142142 <para>
143143 The generator is invoked as follows:
144144<screen>
145−$ cd pkgs/servers/x11/xorg
146−$ cat tarballs-7.5.list extra.list old.list \
145+<prompt>$ </prompt>cd pkgs/servers/x11/xorg
146+<prompt>$ </prompt>cat tarballs-7.5.list extra.list old.list \
147147 | perl ./generate-expr-from-tarballs.pl
148148</screen>
149149 For each of the tarballs in the <filename>.list</filename> files, the script
@@ -160,8 +160,8 @@ $ cat tarballs-7.5.list extra.list old.list \
160160 A file like <filename>tarballs-7.5.list</filename> contains all tarballs in
161161 a X.org release. It can be generated like this:
162162<screen>
163−$ export i="mirror://xorg/X11R7.4/src/everything/"
164−$ cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
163+<prompt>$ </prompt>export i="mirror://xorg/X11R7.4/src/everything/"
164+<prompt>$ </prompt>cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
165165 | perl -e 'while (&lt;>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'i'}$2\n"; }; }' \
166166 | sort > tarballs-7.4.list
167167</screen>
@@ -210,7 +210,7 @@ $ cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
210210 often available. It is possible to list available Eclipse packages by
211211 issuing the command:
212212<screen>
213−$ nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses --description
213+<prompt>$ </prompt>nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses --description
214214</screen>
215215 Once an Eclipse variant is installed it can be run using the
216216 <command>eclipse</command> command, as expected. From within Eclipse it is
@@ -250,7 +250,7 @@ packageOverrides = pkgs: {
250250 available for installation using <varname>eclipseWithPlugins</varname> by
251251 running
252252<screen>
253−$ nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses.plugins --description
253+<prompt>$ </prompt>nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses.plugins --description
254254</screen>
255255 </para>
256256
doc/platform-notes.xml+35−35
@@ -20,14 +20,14 @@
2020 scripts.
2121 </para>
2222<programlisting>
23− stdenv.mkDerivation {
24− name = "libfoo-1.2.3";
25− # ...
26− buildPhase = ''
27− $CC -o hello hello.c
28− '';
29− }
30− </programlisting>
23+stdenv.mkDerivation {
24+ name = "libfoo-1.2.3";
25+ # ...
26+ buildPhase = ''
27+ $CC -o hello hello.c
28+ '';
29+}
30+</programlisting>
3131 </listitem>
3232 <listitem>
3333 <para>
@@ -39,12 +39,12 @@
3939 <function>fixupPhase</function>.
4040 </para>
4141<programlisting>
42− stdenv.mkDerivation {
43− name = "libfoo-1.2.3";
44− # ...
45− makeFlags = stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
46− }
47− </programlisting>
42+stdenv.mkDerivation {
43+ name = "libfoo-1.2.3";
44+ # ...
45+ makeFlags = stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
46+}
47+</programlisting>
4848 </listitem>
4949 <listitem>
5050 <para>
@@ -62,19 +62,19 @@
6262 <manvolnum>1</manvolnum></citerefentry> manpage.
6363 </para>
6464<programlisting>
65− dyld: Library not loaded: /nix/store/7hnmbscpayxzxrixrgxvvlifzlxdsdir-jq-1.5-lib/lib/libjq.1.dylib
66− Referenced from: /private/tmp/nix-build-jq-1.5.drv-0/jq-1.5/tests/../jq
67− Reason: image not found
68− ./tests/jqtest: line 5: 75779 Abort trap: 6
69− </programlisting>
65+dyld: Library not loaded: /nix/store/7hnmbscpayxzxrixrgxvvlifzlxdsdir-jq-1.5-lib/lib/libjq.1.dylib
66+Referenced from: /private/tmp/nix-build-jq-1.5.drv-0/jq-1.5/tests/../jq
67+Reason: image not found
68+./tests/jqtest: line 5: 75779 Abort trap: 6
69+</programlisting>
7070<programlisting>
71− stdenv.mkDerivation {
72− name = "libfoo-1.2.3";
73− # ...
74− doInstallCheck = true;
75− installCheckTarget = "check";
76− }
77− </programlisting>
71+stdenv.mkDerivation {
72+ name = "libfoo-1.2.3";
73+ # ...
74+ doInstallCheck = true;
75+ installCheckTarget = "check";
76+}
77+</programlisting>
7878 </listitem>
7979 <listitem>
8080 <para>
@@ -85,15 +85,15 @@
8585 on xcode.
8686 </para>
8787<programlisting>
88− stdenv.mkDerivation {
89− name = "libfoo-1.2.3";
90− # ...
91− prePatch = ''
92− substituteInPlace Makefile \
93− --replace '/usr/bin/xcrun clang' clang
94− '';
95− }
96− </programlisting>
88+stdenv.mkDerivation {
89+ name = "libfoo-1.2.3";
90+ # ...
91+ prePatch = ''
92+ substituteInPlace Makefile \
93+ --replace '/usr/bin/xcrun clang' clang
94+ '';
95+}
96+</programlisting>
9797 <para>
9898 The package <literal>xcbuild</literal> can be used to build projects that
9999 really depend on Xcode. However, this replacement is not 100% compatible
doc/quick-start.xml+8−8
@@ -9,8 +9,8 @@
99 <para>
1010 Checkout the Nixpkgs source tree:
1111<screen>
12−$ git clone https://github.com/NixOS/nixpkgs
13−$ cd nixpkgs</screen>
12+<prompt>$ </prompt>git clone https://github.com/NixOS/nixpkgs
13+<prompt>$ </prompt>cd nixpkgs</screen>
1414 </para>
1515 </listitem>
1616 <listitem>
@@ -23,7 +23,7 @@ $ cd nixpkgs</screen>
2323 See <xref linkend="sec-organisation" /> for some hints on the tree
2424 organisation. Create a directory for your package, e.g.
2525<screen>
26−$ mkdir pkgs/development/libraries/libfoo</screen>
26+<prompt>$ </prompt>mkdir pkgs/development/libraries/libfoo</screen>
2727 </para>
2828 </listitem>
2929 <listitem>
@@ -34,8 +34,8 @@ $ mkdir pkgs/development/libraries/libfoo</screen>
3434 as arguments, and returns a build of the package in the Nix store. The
3535 expression should usually be called <filename>default.nix</filename>.
3636<screen>
37−$ emacs pkgs/development/libraries/libfoo/default.nix
38−$ git add pkgs/development/libraries/libfoo/default.nix</screen>
37+<prompt>$ </prompt>emacs pkgs/development/libraries/libfoo/default.nix
38+<prompt>$ </prompt>git add pkgs/development/libraries/libfoo/default.nix</screen>
3939 </para>
4040 <para>
4141 You can have a look at the existing Nix expressions under
@@ -180,7 +180,7 @@ $ git add pkgs/development/libraries/libfoo/default.nix</screen>
180180 with some descriptive name for the variable, e.g.
181181 <varname>libfoo</varname>.
182182<screen>
183−$ emacs pkgs/top-level/all-packages.nix</screen>
183+<prompt>$ </prompt>emacs pkgs/top-level/all-packages.nix</screen>
184184 </para>
185185 <para>
186186 The attributes in that file are sorted by category (like “Development /
@@ -193,7 +193,7 @@ $ emacs pkgs/top-level/all-packages.nix</screen>
193193 To test whether the package builds, run the following command from the
194194 root of the nixpkgs source tree:
195195<screen>
196−$ nix-build -A libfoo</screen>
196+<prompt>$ </prompt>nix-build -A libfoo</screen>
197197 where <varname>libfoo</varname> should be the variable name defined in the
198198 previous step. You may want to add the flag <option>-K</option> to keep
199199 the temporary build directory in case something fails. If the build
@@ -205,7 +205,7 @@ $ nix-build -A libfoo</screen>
205205 <para>
206206 If you want to install the package into your profile (optional), do
207207<screen>
208−$ nix-env -f . -iA libfoo</screen>
208+<prompt>$ </prompt>nix-env -f . -iA libfoo</screen>
209209 </para>
210210 </listitem>
211211 <listitem>
doc/reviewing-contributions.xml+5−5
@@ -153,11 +153,11 @@
153153 nixpkgs-unstable for easier review by running the following commands
154154 from a nixpkgs clone.
155155<screen>
156−$ git remote add channels https://github.com/NixOS/nixpkgs-channels.git <co
156+<prompt>$ </prompt>git remote add channels https://github.com/NixOS/nixpkgs-channels.git <co
157157 xml:id='reviewing-rebase-1' />
158−$ git fetch channels nixos-unstable <co xml:id='reviewing-rebase-2' />
159−$ git fetch origin pull/PRNUMBER/head <co xml:id='reviewing-rebase-3' />
160−$ git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD <co
158+<prompt>$ </prompt>git fetch channels nixos-unstable <co xml:id='reviewing-rebase-2' />
159+<prompt>$ </prompt>git fetch origin pull/PRNUMBER/head <co xml:id='reviewing-rebase-3' />
160+<prompt>$ </prompt>git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD <co
161161 xml:id='reviewing-rebase-4' />
162162</screen>
163163 <calloutlist>
@@ -197,7 +197,7 @@ $ git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD <co
197197 request url.
198198 </para>
199199<screen>
200−$ nix-shell -p nix-review --run "nix-review pr PRNUMBER"
200+<prompt>$ </prompt>nix-shell -p nix-review --run "nix-review pr PRNUMBER"
201201</screen>
202202 </listitem>
203203 </itemizedlist>
doc/stdenv.xml+13−13
@@ -343,7 +343,7 @@ let f(h, t, i) = i + (if i &lt;= 0 then h else t - 1)
343343let f(h, h + 1, i) = i + (if i &lt;= 0 then h else (h + 1) - 1)
344344let f(h, h + 1, i) = i + (if i &lt;= 0 then h else h)
345345let f(h, h + 1, i) = i + h
346− </programlisting>
346+</programlisting>
347347 This is where "sum-like" comes in from above: We can just sum all of the
348348 host offsets to get the host offset of the transitive dependency. The target
349349 offset is the transitive dependency is simply the host offset + 1, just as
@@ -2229,7 +2229,7 @@ someVar=$(stripHash $name)
22292229 array by doing something like
22302230<programlisting language="bash">
22312231addEnvHooks "$hostOffset" myBashFunction
2232− </programlisting>
2232+</programlisting>
22332233 </para>
22342234
22352235 <para>
@@ -2667,8 +2667,8 @@ addEnvHooks "$hostOffset" myBashFunction
26672667 that is supposed to be inspected, add <literal>breakpointHook</literal>
26682668 to <literal>nativeBuildInputs</literal>.
26692669<programlisting>
2670− nativeBuildInputs = [ breakpointHook ];
2671− </programlisting>
2670+nativeBuildInputs = [ breakpointHook ];
2671+</programlisting>
26722672 When a build failure happens there will be an instruction printed that
26732673 shows how to attach with <literal>cntr</literal> to the build sandbox.
26742674 </para>
@@ -2863,7 +2863,7 @@ addEnvHooks "$hostOffset" myBashFunction
28632863 printf(help_message);
28642864 ^
28652865cc1plus: some warnings being treated as errors
2866− </programlisting>
2866+</programlisting>
28672867 </listitem>
28682868 </varlistentry>
28692869 <varlistentry>
@@ -2885,7 +2885,7 @@ cc1plus: some warnings being treated as errors
28852885<programlisting>
28862886bin/blib.a(bios_console.o): In function `bios_handle_cup':
28872887/tmp/nix-build-ipxe-20141124-5cbdc41.drv-0/ipxe-5cbdc41/src/arch/i386/firmware/pcbios/bios_console.c:86: undefined reference to `__stack_chk_fail'
2888− </programlisting>
2888+</programlisting>
28892889 </listitem>
28902890 </varlistentry>
28912891 <varlistentry>
@@ -2914,19 +2914,19 @@ bin/blib.a(bios_console.o): In function `bios_handle_cup':
29142914<programlisting>
29152915malloc.c:404:15: error: return type is an incomplete type
29162916malloc.c:410:19: error: storage size of 'ms' isn't known
2917− </programlisting>
2917+</programlisting>
29182918<programlisting>
29192919strdup.h:22:1: error: expected identifier or '(' before '__extension__'
2920− </programlisting>
2920+</programlisting>
29212921<programlisting>
29222922strsep.c:65:23: error: register name not specified for 'delim'
2923− </programlisting>
2923+</programlisting>
29242924<programlisting>
29252925installwatch.c:3751:5: error: conflicting types for '__open_2'
2926− </programlisting>
2926+</programlisting>
29272927<programlisting>
29282928fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
2929− </programlisting>
2929+</programlisting>
29302930 </listitem>
29312931 </varlistentry>
29322932 <varlistentry>
@@ -2951,7 +2951,7 @@ fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute erro
29512951<programlisting>
29522952ccbLfRgg.s: Assembler messages:
29532953ccbLfRgg.s:33: Error: missing or invalid displacement expression `private_key_len@GOTOFF'
2954− </programlisting>
2954+</programlisting>
29552955 </listitem>
29562956 </varlistentry>
29572957 <varlistentry>
@@ -3015,7 +3015,7 @@ ccbLfRgg.s:33: Error: missing or invalid displacement expression `private_key_le
30153015 </para>
30163016<programlisting>
30173017intel_drv.so: undefined symbol: vgaHWFreeHWRec
3018− </programlisting>
3018+</programlisting>
30193019 </listitem>
30203020 </varlistentry>
30213021 </variablelist>
doc/submitting-changes.xml+3−3
@@ -36,8 +36,8 @@
3636 </listitem>
3737 </itemizedlist>
3838<screen>
39−$ git checkout 0998212
40−$ git checkout -b 'fix/pkg-name-update'
39+<prompt>$ </prompt>git checkout 0998212
40+<prompt>$ </prompt>git checkout -b 'fix/pkg-name-update'
4141</screen>
4242 </para>
4343 </listitem>
@@ -514,7 +514,7 @@ The original commit message describing the reason why the world was torn apart.
514514(cherry picked from commit abcdef)
515515Reason: I just had a gut feeling that this would also be wanted by people from
516516the stone age.
517− </screen>
517+</screen>
518518 </listitem>
519519 </itemizedlist>
520520 </section>
nixos/doc/manual/administration/cleaning-store.xml+5−5
@@ -11,12 +11,12 @@
1111 Nix’s <emphasis>garbage collector</emphasis> to remove old, unreferenced
1212 packages. This is easy:
1313<screen>
14−$ nix-collect-garbage
14+<prompt>$ </prompt>nix-collect-garbage
1515</screen>
1616 Alternatively, you can use a systemd unit that does the same in the
1717 background:
1818<screen>
19−# systemctl start nix-gc.service
19+<prompt># </prompt>systemctl start nix-gc.service
2020</screen>
2121 You can tell NixOS in <filename>configuration.nix</filename> to run this unit
2222 automatically at certain points in time, for instance, every night at 03:15:
@@ -31,11 +31,11 @@ $ nix-collect-garbage
3131 configurations. The following command deletes old roots, removing the ability
3232 to roll back to them:
3333<screen>
34−$ nix-collect-garbage -d
34+<prompt>$ </prompt>nix-collect-garbage -d
3535</screen>
3636 You can also do this for specific profiles, e.g.
3737<screen>
38−$ nix-env -p /nix/var/nix/profiles/per-user/eelco/profile --delete-generations old
38+<prompt>$ </prompt>nix-env -p /nix/var/nix/profiles/per-user/eelco/profile --delete-generations old
3939</screen>
4040 Note that NixOS system configurations are stored in the profile
4141 <filename>/nix/var/nix/profiles/system</filename>.
@@ -45,7 +45,7 @@ $ nix-env -p /nix/var/nix/profiles/per-user/eelco/profile --delete-generations o
4545 Nix store) is to run Nix’s store optimiser, which seeks out identical files
4646 in the store and replaces them with hard links to a single copy.
4747<screen>
48−$ nix-store --optimise
48+<prompt>$ </prompt>nix-store --optimise
4949</screen>
5050 Since this command needs to read the entire Nix store, it can take quite a
5151 while to finish.
nixos/doc/manual/administration/container-networking.xml+2−2
@@ -11,10 +11,10 @@
1111 <literal>10.233.0.0/16</literal>. You can get the container’s IPv4 address
1212 as follows:
1313<screen>
14−# nixos-container show-ip foo
14+<prompt># </prompt>nixos-container show-ip foo
151510.233.4.2
1616
17−$ ping -c1 10.233.4.2
17+<prompt>$ </prompt>ping -c1 10.233.4.2
181864 bytes from 10.233.4.2: icmp_seq=1 ttl=64 time=0.106 ms
1919</screen>
2020 </para>
nixos/doc/manual/administration/control-groups.xml+1−1
@@ -16,7 +16,7 @@
1616 <literal>systemd</literal> hierarchy, which is what systemd uses to keep
1717 track of the processes belonging to each service or user session:
1818<screen>
19−$ systemd-cgls
19+<prompt>$ </prompt>systemd-cgls
2020├─user
2121│ └─eelco
2222│ └─c1
nixos/doc/manual/administration/logging.xml+3−3
@@ -11,14 +11,14 @@
1111 The command <literal>journalctl</literal> allows you to see the contents of
1212 the journal. For example,
1313<screen>
14−$ journalctl -b
14+<prompt>$ </prompt>journalctl -b
1515</screen>
1616 shows all journal entries since the last reboot. (The output of
1717 <command>journalctl</command> is piped into <command>less</command> by
1818 default.) You can use various options and match operators to restrict output
1919 to messages of interest. For instance, to get all messages from PostgreSQL:
2020<screen>
21−$ journalctl -u postgresql.service
21+<prompt>$ </prompt>journalctl -u postgresql.service
2222-- Logs begin at Mon, 2013-01-07 13:28:01 CET, end at Tue, 2013-01-08 01:09:57 CET. --
2323...
2424Jan 07 15:44:14 hagbard postgres[2681]: [2-1] LOG: database system is shut down
@@ -29,7 +29,7 @@ Jan 07 15:45:13 hagbard postgres[2500]: [1-1] LOG: database system is ready to
2929 Or to get all messages since the last reboot that have at least a
3030 “critical” severity level:
3131<screen>
32−$ journalctl -b -p crit
32+<prompt>$ </prompt>journalctl -b -p crit
3333Dec 17 21:08:06 mandark sudo[3673]: pam_unix(sudo:auth): auth could not identify password for [alice]
3434Dec 29 01:30:22 mandark kernel[6131]: [1053513.909444] CPU6: Core temperature above threshold, cpu clock throttled (total events = 1)
3535</screen>
nixos/doc/manual/administration/rollback.xml+1−1
@@ -33,7 +33,7 @@
3333 where <replaceable>N</replaceable> is the number of the NixOS system
3434 configuration. To get a list of the available configurations, do:
3535<screen>
36−$ ls -l /nix/var/nix/profiles/system-*-link
36+<prompt>$ </prompt>ls -l /nix/var/nix/profiles/system-*-link
3737<replaceable>...</replaceable>
3838lrwxrwxrwx 1 root root 78 Aug 12 13:54 /nix/var/nix/profiles/system-268-link -> /nix/store/202b...-nixos-13.07pre4932_5a676e4-4be1055
3939</screen>
nixos/doc/manual/administration/service-mgmt.xml+2−2
@@ -21,7 +21,7 @@
2121 <command>systemd</command>. Without any arguments, it shows the status of
2222 active units:
2323<screen>
24−$ systemctl
24+<prompt>$ </prompt>systemctl
2525-.mount loaded active mounted /
2626swapfile.swap loaded active active /swapfile
2727sshd.service loaded active running SSH Daemon
@@ -33,7 +33,7 @@ graphical.target loaded active active Graphical Interface
3333 You can ask for detailed status information about a unit, for instance, the
3434 PostgreSQL database service:
3535<screen>
36−$ systemctl status postgresql.service
36+<prompt>$ </prompt>systemctl status postgresql.service
3737postgresql.service - PostgreSQL Server
3838 Loaded: loaded (/nix/store/pn3q73mvh75gsrl8w7fdlfk3fq5qm5mw-unit/postgresql.service)
3939 Active: active (running) since Mon, 2013-01-07 15:55:57 CET; 9h ago
nixos/doc/manual/administration/store-corruption.xml+2−2
@@ -18,7 +18,7 @@
1818 If the corruption is in a path in the closure of the NixOS system
1919 configuration, you can fix it by doing
2020<screen>
21−# nixos-rebuild switch --repair
21+<prompt># </prompt>nixos-rebuild switch --repair
2222</screen>
2323 This will cause Nix to check every path in the closure, and if its
2424 cryptographic hash differs from the hash recorded in Nix’s database, the
@@ -28,7 +28,7 @@
2828 <para>
2929 You can also scan the entire Nix store for corrupt paths:
3030<screen>
31−# nix-store --verify --check-contents --repair
31+<prompt># </prompt>nix-store --verify --check-contents --repair
3232</screen>
3333 Any corrupt paths will be redownloaded if they’re available in a binary
3434 cache; otherwise, they cannot be repaired.
nixos/doc/manual/administration/user-sessions.xml+2−2
@@ -10,7 +10,7 @@
1010 allows querying and manipulating user sessions. For instance, to list all
1111 user sessions:
1212<screen>
13−$ loginctl
13+<prompt>$ </prompt>loginctl
1414 SESSION UID USER SEAT
1515 c1 500 eelco seat0
1616 c3 0 root seat0
@@ -21,7 +21,7 @@ $ loginctl
2121 devices attached to the system; usually, there is only one seat.) To get
2222 information about a session:
2323<screen>
24−$ loginctl session-status c3
24+<prompt>$ </prompt>loginctl session-status c3
2525c3 - root (0)
2626 Since: Tue, 2013-01-08 01:17:56 CET; 4min 42s ago
2727 Leader: 2536 (login)
nixos/doc/manual/configuration/ad-hoc-packages.xml+5−5
@@ -9,7 +9,7 @@
99 With the command <command>nix-env</command>, you can install and uninstall
1010 packages from the command line. For instance, to install Mozilla Thunderbird:
1111<screen>
12−$ nix-env -iA nixos.thunderbird</screen>
12+<prompt>$ </prompt>nix-env -iA nixos.thunderbird</screen>
1313 If you invoke this as root, the package is installed in the Nix profile
1414 <filename>/nix/var/nix/profiles/default</filename> and visible to all users
1515 of the system; otherwise, the package ends up in
@@ -25,7 +25,7 @@ $ nix-env -iA nixos.thunderbird</screen>
2525 Packages come from the NixOS channel. You typically upgrade a package by
2626 updating to the latest version of the NixOS channel:
2727<screen>
28−$ nix-channel --update nixos
28+<prompt>$ </prompt>nix-channel --update nixos
2929</screen>
3030 and then running <literal>nix-env -i</literal> again. Other packages in the
3131 profile are <emphasis>not</emphasis> affected; this is the crucial difference
@@ -34,21 +34,21 @@ $ nix-channel --update nixos
3434 their current versions in the NixOS channel. You can however upgrade all
3535 packages for which there is a newer version by doing:
3636<screen>
37−$ nix-env -u '*'
37+<prompt>$ </prompt>nix-env -u '*'
3838</screen>
3939 </para>
4040
4141 <para>
4242 A package can be uninstalled using the <option>-e</option> flag:
4343<screen>
44−$ nix-env -e thunderbird
44+<prompt>$ </prompt>nix-env -e thunderbird
4545</screen>
4646 </para>
4747
4848 <para>
4949 Finally, you can roll back an undesirable <command>nix-env</command> action:
5050<screen>
51−$ nix-env --rollback
51+<prompt>$ </prompt>nix-env --rollback
5252</screen>
5353 </para>
5454
nixos/doc/manual/configuration/adding-custom-packages.xml+4−4
@@ -14,8 +14,8 @@
1414xlink:href="http://nixos.org/nixpkgs/manual">Nixpkgs
1515 manual</link>. In short, you clone Nixpkgs:
1616<screen>
17−$ git clone https://github.com/NixOS/nixpkgs
18−$ cd nixpkgs
17+<prompt>$ </prompt>git clone https://github.com/NixOS/nixpkgs
18+<prompt>$ </prompt>cd nixpkgs
1919</screen>
2020 Then you write and test the package as described in the Nixpkgs manual.
2121 Finally, you add it to <literal>environment.systemPackages</literal>, e.g.
@@ -65,8 +65,8 @@ stdenv.mkDerivation rec {
6565</programlisting>
6666 This allows testing the package easily:
6767<screen>
68−$ nix-build my-hello.nix
69−$ ./result/bin/hello
68+<prompt>$ </prompt>nix-build my-hello.nix
69+<prompt>$ </prompt>./result/bin/hello
7070Hello, world!
7171</screen>
7272 </para>
nixos/doc/manual/configuration/declarative-packages.xml+1−1
@@ -22,7 +22,7 @@
2222 <para>
2323 You can get a list of the available packages as follows:
2424<screen>
25−$ nix-env -qaP '*' --description
25+<prompt>$ </prompt>nix-env -qaP '*' --description
2626nixos.firefox firefox-23.0 Mozilla Firefox - the browser, reloaded
2727<replaceable>...</replaceable>
2828</screen>
nixos/doc/manual/configuration/matrix.xml+94−94
@@ -33,91 +33,91 @@
3333 <link xlink:href="https://github.com/matrix-org/synapse#synapse-installation">
3434 installation instructions of Synapse </link>.
3535<programlisting>
36+let
37+ fqdn =
3638 let
37− fqdn =
38− let
39− join = hostName: domain: hostName + optionalString (domain != null) ".${domain}";
40− in join config.networking.hostName config.networking.domain;
41− in {
42− networking = {
43− hostName = "myhostname";
44− domain = "example.org";
45− };
46− networking.firewall.allowedTCPPorts = [ 80 443 ];
39+ join = hostName: domain: hostName + optionalString (domain != null) ".${domain}";
40+ in join config.networking.hostName config.networking.domain;
41+in {
42+ networking = {
43+ hostName = "myhostname";
44+ domain = "example.org";
45+ };
46+ networking.firewall.allowedTCPPorts = [ 80 443 ];
4747
48− services.nginx = {
49− enable = true;
50− # only recommendedProxySettings and recommendedGzipSettings are strictly required,
51− # but the rest make sense as well
52− recommendedTlsSettings = true;
53− recommendedOptimisation = true;
54− recommendedGzipSettings = true;
55− recommendedProxySettings = true;
48+ services.nginx = {
49+ enable = true;
50+ # only recommendedProxySettings and recommendedGzipSettings are strictly required,
51+ # but the rest make sense as well
52+ recommendedTlsSettings = true;
53+ recommendedOptimisation = true;
54+ recommendedGzipSettings = true;
55+ recommendedProxySettings = true;
5656
57− virtualHosts = {
58− # This host section can be placed on a different host than the rest,
59− # i.e. to delegate from the host being accessible as ${config.networking.domain}
60− # to another host actually running the Matrix homeserver.
61− "${config.networking.domain}" = {
62− locations."= /.well-known/matrix/server".extraConfig =
63− let
64− # use 443 instead of the default 8448 port to unite
65− # the client-server and server-server port for simplicity
66− server = { "m.server" = "${fqdn}:443"; };
67− in ''
68− add_header Content-Type application/json;
69− return 200 '${builtins.toJSON server}';
70− '';
71− locations."= /.well-known/matrix/client".extraConfig =
72− let
73− client = {
74− "m.homeserver" = { "base_url" = "https://${fqdn}"; };
75− "m.identity_server" = { "base_url" = "https://vector.im"; };
76− };
77− # ACAO required to allow riot-web on any URL to request this json file
78− in ''
79− add_header Content-Type application/json;
80− add_header Access-Control-Allow-Origin *;
81− return 200 '${builtins.toJSON client}';
82− '';
83− };
57+ virtualHosts = {
58+ # This host section can be placed on a different host than the rest,
59+ # i.e. to delegate from the host being accessible as ${config.networking.domain}
60+ # to another host actually running the Matrix homeserver.
61+ "${config.networking.domain}" = {
62+ locations."= /.well-known/matrix/server".extraConfig =
63+ let
64+ # use 443 instead of the default 8448 port to unite
65+ # the client-server and server-server port for simplicity
66+ server = { "m.server" = "${fqdn}:443"; };
67+ in ''
68+ add_header Content-Type application/json;
69+ return 200 '${builtins.toJSON server}';
70+ '';
71+ locations."= /.well-known/matrix/client".extraConfig =
72+ let
73+ client = {
74+ "m.homeserver" = { "base_url" = "https://${fqdn}"; };
75+ "m.identity_server" = { "base_url" = "https://vector.im"; };
76+ };
77+ # ACAO required to allow riot-web on any URL to request this json file
78+ in ''
79+ add_header Content-Type application/json;
80+ add_header Access-Control-Allow-Origin *;
81+ return 200 '${builtins.toJSON client}';
82+ '';
83+ };
8484
85− # Reverse proxy for Matrix client-server and server-server communication
86− ${fqdn} = {
87− enableACME = true;
88− forceSSL = true;
85+ # Reverse proxy for Matrix client-server and server-server communication
86+ ${fqdn} = {
87+ enableACME = true;
88+ forceSSL = true;
8989
90− # Or do a redirect instead of the 404, or whatever is appropriate for you.
91− # But do not put a Matrix Web client here! See the Riot Web section below.
92− locations."/".extraConfig = ''
93− return 404;
94− '';
90+ # Or do a redirect instead of the 404, or whatever is appropriate for you.
91+ # But do not put a Matrix Web client here! See the Riot Web section below.
92+ locations."/".extraConfig = ''
93+ return 404;
94+ '';
9595
96− # forward all Matrix API calls to the synapse Matrix homeserver
97− locations."/_matrix" = {
98− proxyPass = "http://[::1]:8008";
99− };
100− };
96+ # forward all Matrix API calls to the synapse Matrix homeserver
97+ locations."/_matrix" = {
98+ proxyPass = "http://[::1]:8008";
10199 };
102100 };
103− services.matrix-synapse = {
104− enable = true;
105− server_name = config.networking.domain;
106− listeners = [
107− {
108− port = 8008;
109− bind_address = "::1";
110− type = "http";
111− tls = false;
112− x_forwarded = true;
113− resources = [
114− { names = [ "client" "federation" ]; compress = false; }
115− ];
116− }
117− ];
118− };
119101 };
120− </programlisting>
102+ };
103+ services.matrix-synapse = {
104+ enable = true;
105+ server_name = config.networking.domain;
106+ listeners = [
107+ {
108+ port = 8008;
109+ bind_address = "::1";
110+ type = "http";
111+ tls = false;
112+ x_forwarded = true;
113+ resources = [
114+ { names = [ "client" "federation" ]; compress = false; }
115+ ];
116+ }
117+ ];
118+ };
119+};
120+</programlisting>
121121 </para>
122122
123123 <para>
@@ -141,15 +141,15 @@
141141 <option>services.matrix-synapse.registration_shared_secret</option>. To
142142 create a new user or admin, run the following after you have set the secret
143143 and have rebuilt NixOS:
144−<programlisting>
145− $ nix run nixpkgs.matrix-synapse
146− $ register_new_matrix_user -k &lt;your-registration-shared-secret&gt; http://localhost:8008
147− New user localpart: &lt;your-username&gt;
148− Password:
149− Confirm password:
150− Make admin [no]:
151− Success!
152− </programlisting>
144+<screen>
145+<prompt>$ </prompt>nix run nixpkgs.matrix-synapse
146+<prompt>$ </prompt>register_new_matrix_user -k <replaceable>your-registration-shared-secret</replaceable> http://localhost:8008
147+<prompt>New user localpart: </prompt><replaceable>your-username</replaceable>
148+<prompt>Password:</prompt>
149+<prompt>Confirm password:</prompt>
150+<prompt>Make admin [no]:</prompt>
151+Success!
152+</screen>
153153 In the example, this would create a user with the Matrix Identifier
154154 <literal>@your-username:example.org</literal>. Note that the registration
155155 secret ends up in the nix store and therefore is world-readable by any user
@@ -177,16 +177,16 @@
177177 Matrix Now!</link> for a list of existing clients and their supported
178178 featureset.
179179<programlisting>
180− services.nginx.virtualHosts."riot.${fqdn}" = {
181− enableACME = true;
182− forceSSL = true;
183− serverAliases = [
184− "riot.${config.networking.domain}"
185− ];
180+services.nginx.virtualHosts."riot.${fqdn}" = {
181+ enableACME = true;
182+ forceSSL = true;
183+ serverAliases = [
184+ "riot.${config.networking.domain}"
185+ ];
186186
187− root = pkgs.riot-web;
188− };
189− </programlisting>
187+ root = pkgs.riot-web;
188+};
189+</programlisting>
190190 </para>
191191
192192 <para>
nixos/doc/manual/configuration/modularity.xml+14−14
@@ -106,21 +106,21 @@ The unique option `services.httpd.adminAddr' is defined multiple times, in `/etc
106106 configuration option is. The command <option>nixos-option</option> allows you
107107 to find out:
108108<screen>
109−$ nixos-option <xref linkend="opt-services.xserver.enable"/>
109+<prompt>$ </prompt>nixos-option <xref linkend="opt-services.xserver.enable"/>
110110true
111111
112−$ nixos-option <xref linkend="opt-boot.kernelModules"/>
112+<prompt>$ </prompt>nixos-option <xref linkend="opt-boot.kernelModules"/>
113113[ "tun" "ipv6" "loop" <replaceable>...</replaceable> ]
114114</screen>
115115 Interactive exploration of the configuration is possible using <command>nix
116116 repl</command>, a read-eval-print loop for Nix expressions. A typical use:
117117<screen>
118−$ nix repl '&lt;nixpkgs/nixos>'
118+<prompt>$ </prompt>nix repl '&lt;nixpkgs/nixos>'
119119
120−nix-repl> config.<xref linkend="opt-networking.hostName"/>
120+<prompt>nix-repl> </prompt>config.<xref linkend="opt-networking.hostName"/>
121121"mandark"
122122
123−nix-repl> map (x: x.hostName) config.<xref linkend="opt-services.httpd.virtualHosts"/>
123+<prompt>nix-repl> </prompt>map (x: x.hostName) config.<xref linkend="opt-services.httpd.virtualHosts"/>
124124[ "example.org" "example.gov" ]
125125</screen>
126126 </para>
@@ -129,17 +129,17 @@ nix-repl> map (x: x.hostName) config.<xref linkend="opt-services.httpd.virtualHo
129129 While abstracting your configuration, you may find it useful to generate
130130 modules using code, instead of writing files. The example below would have
131131 the same effect as importing a file which sets those options.
132−<screen>
133− { config, pkgs, ... }:
132+<programlisting>
133+{ config, pkgs, ... }:
134134
135− let netConfig = { hostName }: {
136− networking.hostName = hostName;
137− networking.useDHCP = false;
138− };
135+let netConfig = { hostName }: {
136+ networking.hostName = hostName;
137+ networking.useDHCP = false;
138+};
139139
140− in
140+in
141141
142− { imports = [ (netConfig "nixos.localdomain") ]; }
143− </screen>
142+{ imports = [ (netConfig "nixos.localdomain") ]; }
143+</programlisting>
144144 </para>
145145</section>
nixos/doc/manual/configuration/profiles.xml+1−1
@@ -16,7 +16,7 @@
1616 imports = [
1717 &lt;nixpkgs/nixos/modules/profiles/profile-name.nix&gt;
1818 ];
19− </programlisting>
19+</programlisting>
2020 <para>
2121 Even if some of these profiles seem only useful in the context of install
2222 media, many are actually intended to be used in real installs.
nixos/doc/manual/configuration/user-mgmt.xml+1−1
@@ -44,7 +44,7 @@
4444 A user ID (uid) is assigned automatically. You can also specify a uid
4545 manually by adding
4646<programlisting>
47− uid = 1000;
47+uid = 1000;
4848</programlisting>
4949 to the user specification.
5050 </para>
nixos/doc/manual/configuration/wireless.xml+3−3
@@ -37,7 +37,7 @@
3737 If you are using WPA2 you can generate pskRaw key using
3838 <command>wpa_passphrase</command>:
3939<screen>
40−$ wpa_passphrase ESSID PSK
40+<prompt>$ </prompt>wpa_passphrase ESSID PSK
4141network={
4242 ssid="echelon"
4343 #psk="abcdefgh"
@@ -54,10 +54,10 @@ network={
5454 or you can use it to directly generate the
5555 <literal>wpa_supplicant.conf</literal>:
5656<screen>
57−# wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf</screen>
57+<prompt># </prompt>wpa_passphrase ESSID PSK > /etc/wpa_supplicant.conf</screen>
5858 After you have edited the <literal>wpa_supplicant.conf</literal>, you need to
5959 restart the wpa_supplicant service.
6060<screen>
61−# systemctl restart wpa_supplicant.service</screen>
61+<prompt># </prompt>systemctl restart wpa_supplicant.service</screen>
6262 </para>
6363</section>
nixos/doc/manual/configuration/xfce.xml+6−6
@@ -11,7 +11,7 @@
1111 <link linkend="opt-services.xserver.desktopManager.xfce.enable">xfce.enable</link> = true;
1212 <link linkend="opt-services.xserver.desktopManager.default">default</link> = "xfce";
1313};
14− </programlisting>
14+</programlisting>
1515 </para>
1616 <para>
1717 Optionally, <emphasis>compton</emphasis> can be enabled for nice graphical
@@ -24,7 +24,7 @@
2424 <link linkend="opt-services.compton.shadow">shadow</link> = true;
2525 <link linkend="opt-services.compton.fadeDelta">fadeDelta</link> = 4;
2626};
27− </programlisting>
27+</programlisting>
2828 </para>
2929 <para>
3030 Some Xfce programs are not installed automatically. To install them manually
@@ -37,7 +37,7 @@
3737 To enable <emphasis>Thunar</emphasis> volume support, put
3838<programlisting>
3939<xref linkend="opt-services.xserver.desktopManager.xfce.enable"/> = true;
40− </programlisting>
40+</programlisting>
4141 into your <emphasis>configuration.nix</emphasis>.
4242 </para>
4343 </simplesect>
@@ -58,14 +58,14 @@
5858 on start (look at <command>journalctl --user -b</command>).
5959<programlisting>
6060Thunar:2410): GVFS-RemoteVolumeMonitor-WARNING **: remote volume monitor with dbus name org.gtk.Private.UDisks2VolumeMonitor is not supported
61− </programlisting>
61+</programlisting>
6262 This is caused by some needed GNOME services not running. This is all fixed
6363 by enabling "Launch GNOME services on startup" in the Advanced tab of the
6464 Session and Startup settings panel. Alternatively, you can run this command
6565 to do the same thing.
6666<programlisting>
67−$ xfconf-query -c xfce4-session -p /compat/LaunchGNOME -s true
68− </programlisting>
67+<prompt>$ </prompt>xfconf-query -c xfce4-session -p /compat/LaunchGNOME -s true
68+</programlisting>
6969 A log-out and re-log will be needed for this to take effect.
7070 </para>
7171 </simplesect>
nixos/doc/manual/development/building-nixos.xml+4−4
@@ -14,14 +14,14 @@
1414 Default CD/DVD configurations are available inside
1515 <filename>nixos/modules/installer/cd-dvd</filename>.
1616<screen>
17−$ git clone https://github.com/NixOS/nixpkgs.git
18−$ cd nixpkgs/nixos
19−$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix</screen>
17+<prompt>$ </prompt>git clone https://github.com/NixOS/nixpkgs.git
18+<prompt>$ </prompt>cd nixpkgs/nixos
19+<prompt>$ </prompt>nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix</screen>
2020 </para>
2121 <para>
2222 Before burning your CD/DVD, you can check the content of the image by
2323 mounting anywhere like suggested by the following command:
2424<screen>
25−# mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso</screen>
25+<prompt># </prompt>mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso</screen>
2626 </para>
2727</chapter>
nixos/doc/manual/development/building-parts.xml+10−10
@@ -8,8 +8,8 @@
88 With the command <command>nix-build</command>, you can build specific parts
99 of your NixOS configuration. This is done as follows:
1010<screen>
11−$ cd <replaceable>/path/to/nixpkgs/nixos</replaceable>
12−$ nix-build -A config.<replaceable>option</replaceable></screen>
11+<prompt>$ </prompt>cd <replaceable>/path/to/nixpkgs/nixos</replaceable>
12+<prompt>$ </prompt>nix-build -A config.<replaceable>option</replaceable></screen>
1313 where <replaceable>option</replaceable> is a NixOS option with type
1414 “derivation” (i.e. something that can be built). Attributes of interest
1515 include:
@@ -28,7 +28,7 @@ $ nix-build -A config.<replaceable>option</replaceable></screen>
2828 <para>
2929 A shortcut to build this is:
3030<screen>
31−$ nix-build -A system</screen>
31+<prompt>$ </prompt>nix-build -A system</screen>
3232 </para>
3333 </listitem>
3434 </varlistentry>
@@ -66,9 +66,9 @@ $ nix-build -A system</screen>
6666 test whether the kernel and the initial ramdisk boot correctly, by using
6767 QEMU’s <option>-kernel</option> and <option>-initrd</option> options:
6868<screen>
69−$ nix-build -A config.system.build.initialRamdisk -o initrd
70−$ nix-build -A config.system.build.kernel -o kernel
71−$ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/null
69+<prompt>$ </prompt>nix-build -A config.system.build.initialRamdisk -o initrd
70+<prompt>$ </prompt>nix-build -A config.system.build.kernel -o kernel
71+<prompt>$ </prompt>qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/null
7272</screen>
7373 </para>
7474 </listitem>
@@ -99,15 +99,15 @@ $ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/
9999 contain dots (e.g. <literal>httpd.service</literal>), you need to put
100100 them between quotes, like this:
101101<screen>
102−$ nix-build -A 'config.systemd.units."httpd.service".unit'
102+<prompt>$ </prompt>nix-build -A 'config.systemd.units."httpd.service".unit'
103103</screen>
104104 You can also test individual units, without rebuilding the whole system,
105105 by putting them in <filename>/run/systemd/system</filename>:
106106<screen>
107−$ cp $(nix-build -A 'config.systemd.units."httpd.service".unit')/httpd.service \
107+<prompt>$ </prompt>cp $(nix-build -A 'config.systemd.units."httpd.service".unit')/httpd.service \
108108 /run/systemd/system/tmp-httpd.service
109−# systemctl daemon-reload
110−# systemctl start tmp-httpd.service
109+<prompt># </prompt>systemctl daemon-reload
110+<prompt># </prompt>systemctl start tmp-httpd.service
111111</screen>
112112 Note that the unit must not have the same name as any unit in
113113 <filename>/etc/systemd/system</filename> since those take precedence over
nixos/doc/manual/development/running-nixos-tests-interactively.xml+9−9
@@ -9,17 +9,17 @@
99 The test itself can be run interactively. This is particularly useful when
1010 developing or debugging a test:
1111<screen>
12−$ nix-build nixos/tests/login.nix -A driver
13−$ ./result/bin/nixos-test-driver
12+<prompt>$ </prompt>nix-build nixos/tests/login.nix -A driver
13+<prompt>$ </prompt>./result/bin/nixos-test-driver
1414starting VDE switch for network 1
15−&gt;
15+<prompt>&gt;</prompt>
1616</screen>
1717 You can then take any Perl statement, e.g.
1818<screen>
19−&gt; startAll
20−&gt; testScript
21−&gt; $machine->succeed("touch /tmp/foo")
22−&gt; print($machine->succeed("pwd")) # Show stdout of command
19+<prompt>&gt;</prompt> startAll
20+<prompt>&gt;</prompt> testScript
21+<prompt>&gt;</prompt> $machine->succeed("touch /tmp/foo")
22+<prompt>&gt;</prompt> print($machine->succeed("pwd")) # Show stdout of command
2323</screen>
2424 The function <command>testScript</command> executes the entire test script
2525 and drops you back into the test driver command line upon its completion.
@@ -30,8 +30,8 @@ starting VDE switch for network 1
3030 <para>
3131 To just start and experiment with the VMs, run:
3232<screen>
33−$ nix-build nixos/tests/login.nix -A driver
34−$ ./result/bin/nixos-run-vms
33+<prompt>$ </prompt>nix-build nixos/tests/login.nix -A driver
34+<prompt>$ </prompt>./result/bin/nixos-run-vms
3535</screen>
3636 The script <command>nixos-run-vms</command> starts the virtual machines
3737 defined by test.
nixos/doc/manual/development/running-nixos-tests.xml+4−4
@@ -12,12 +12,12 @@
1212xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix">login.nix</filename>,
1313 you just do:
1414<screen>
15−$ nix-build '&lt;nixpkgs/nixos/tests/login.nix>'
15+<prompt>$ </prompt>nix-build '&lt;nixpkgs/nixos/tests/login.nix>'
1616</screen>
1717 or, if you don’t want to rely on <envar>NIX_PATH</envar>:
1818<screen>
19−$ cd /my/nixpkgs/nixos/tests
20−$ nix-build login.nix
19+<prompt>$ </prompt>cd /my/nixpkgs/nixos/tests
20+<prompt>$ </prompt>nix-build login.nix
2121…
2222running the VM test script
2323machine: QEMU running (pid 8841)
@@ -30,7 +30,7 @@ machine: QEMU running (pid 8841)
3030 fast, as no disk image needs to be created. Afterwards, you can view a
3131 pretty-printed log of the test:
3232<screen>
33−$ firefox result/log.html
33+<prompt>$ </prompt>firefox result/log.html
3434</screen>
3535 </para>
3636</section>
nixos/doc/manual/development/sources.xml+12−12
@@ -11,10 +11,10 @@
1111 modify NixOS, however, you should check out the latest sources from Git. This
1212 is as follows:
1313<screen>
14−$ git clone https://github.com/NixOS/nixpkgs
15−$ cd nixpkgs
16−$ git remote add channels https://github.com/NixOS/nixpkgs-channels
17−$ git remote update channels
14+<prompt>$ </prompt>git clone https://github.com/NixOS/nixpkgs
15+<prompt>$ </prompt>cd nixpkgs
16+<prompt>$ </prompt>git remote add channels https://github.com/NixOS/nixpkgs-channels
17+<prompt>$ </prompt>git remote update channels
1818</screen>
1919 This will check out the latest Nixpkgs sources to
2020 <filename>./nixpkgs</filename> the NixOS sources to
@@ -32,23 +32,23 @@ $ git remote update channels
3232 not have caught up yet and you’ll have to rebuild everything from source.
3333 So you may want to create a local branch based on your current NixOS version:
3434<screen>
35−$ nixos-version
35+<prompt>$ </prompt>nixos-version
363617.09pre104379.6e0b727 (Hummingbird)
3737
38−$ git checkout -b local 6e0b727
38+<prompt>$ </prompt>git checkout -b local 6e0b727
3939</screen>
4040 Or, to base your local branch on the latest version available in a NixOS
4141 channel:
4242<screen>
43−$ git remote update channels
44−$ git checkout -b local channels/nixos-17.03
43+<prompt>$ </prompt>git remote update channels
44+<prompt>$ </prompt>git checkout -b local channels/nixos-17.03
4545</screen>
4646 (Replace <literal>nixos-17.03</literal> with the name of the channel you want
4747 to use.) You can use <command>git merge</command> or <command>git
4848 rebase</command> to keep your local branch in sync with the channel, e.g.
4949<screen>
50−$ git remote update channels
51−$ git merge channels/nixos-17.03
50+<prompt>$ </prompt>git remote update channels
51+<prompt>$ </prompt>git merge channels/nixos-17.03
5252</screen>
5353 You can use <command>git cherry-pick</command> to copy commits from your
5454 local branch to the upstream branch.
@@ -58,7 +58,7 @@ $ git merge channels/nixos-17.03
5858 tell <command>nixos-rebuild</command> about them using the
5959 <option>-I</option> flag:
6060<screen>
61−# nixos-rebuild switch -I nixpkgs=<replaceable>/my/sources</replaceable>/nixpkgs
61+<prompt># </prompt>nixos-rebuild switch -I nixpkgs=<replaceable>/my/sources</replaceable>/nixpkgs
6262</screen>
6363 </para>
6464 <para>
@@ -67,7 +67,7 @@ $ git merge channels/nixos-17.03
6767 <replaceable>/my/sources</replaceable>/nixpkgs</command>, or change the
6868 default by adding a symlink in <filename>~/.nix-defexpr</filename>:
6969<screen>
70−$ ln -s <replaceable>/my/sources</replaceable>/nixpkgs ~/.nix-defexpr/nixpkgs
70+<prompt>$ </prompt>ln -s <replaceable>/my/sources</replaceable>/nixpkgs ~/.nix-defexpr/nixpkgs
7171</screen>
7272 You may want to delete the symlink
7373 <filename>~/.nix-defexpr/channels_root</filename> to prevent root’s NixOS
nixos/doc/manual/development/testing-installer.xml+6−6
@@ -8,15 +8,15 @@
88 Building, burning, and booting from an installation CD is rather tedious, so
99 here is a quick way to see if the installer works properly:
1010<screen>
11−# mount -t tmpfs none /mnt
12−# nixos-generate-config --root /mnt
13−$ nix-build '&lt;nixpkgs/nixos>' -A config.system.build.nixos-install
14−# ./result/bin/nixos-install</screen>
11+<prompt># </prompt>mount -t tmpfs none /mnt
12+<prompt># </prompt>nixos-generate-config --root /mnt
13+<prompt>$ </prompt>nix-build '&lt;nixpkgs/nixos>' -A config.system.build.nixos-install
14+<prompt># </prompt>./result/bin/nixos-install</screen>
1515 To start a login shell in the new NixOS installation in
1616 <filename>/mnt</filename>:
1717<screen>
18−$ nix-build '&lt;nixpkgs/nixos>' -A config.system.build.nixos-enter
19−# ./result/bin/nixos-enter
18+<prompt>$ </prompt>nix-build '&lt;nixpkgs/nixos>' -A config.system.build.nixos-enter
19+<prompt># </prompt>./result/bin/nixos-enter
2020</screen>
2121 </para>
2222</chapter>
nixos/doc/manual/development/writing-nixos-tests.xml+7−7
@@ -397,9 +397,9 @@ startAll;
397397 </para>
398398 <para>
399399<programlisting>
400− $machine->systemctl("list-jobs --no-pager"); // runs `systemctl list-jobs --no-pager`
401− $machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager`
402− </programlisting>
400+$machine->systemctl("list-jobs --no-pager"); // runs `systemctl list-jobs --no-pager`
401+$machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager`
402+</programlisting>
403403 </para>
404404 </listitem>
405405 </varlistentry>
@@ -410,10 +410,10 @@ startAll;
410410 To test user units declared by <literal>systemd.user.services</literal> the
411411 optional <literal>$user</literal> argument can be used:
412412<programlisting>
413− $machine->start;
414− $machine->waitForX;
415− $machine->waitForUnit("xautolock.service", "x-session-user");
416− </programlisting>
413+$machine->start;
414+$machine->waitForX;
415+$machine->waitForUnit("xautolock.service", "x-session-user");
416+</programlisting>
417417 This applies to <literal>systemctl</literal>, <literal>getUnitInfo</literal>,
418418 <literal>waitForUnit</literal>, <literal>startJob</literal> and
419419 <literal>stopJob</literal>.
nixos/doc/manual/installation/changing-config.xml+14−9
@@ -9,7 +9,8 @@
99 <link linkend="ch-configuration">changed something</link> in that file, you
1010 should do
1111<screen>
12−# nixos-rebuild switch</screen>
12+<prompt># </prompt>nixos-rebuild switch
13+</screen>
1314 to build the new configuration, make it the default configuration for
1415 booting, and try to realise the configuration in the running system (e.g., by
1516 restarting system services).
@@ -23,7 +24,8 @@
2324 <para>
2425 You can also do
2526<screen>
26−# nixos-rebuild test</screen>
27+<prompt># </prompt>nixos-rebuild test
28+</screen>
2729 to build the configuration and switch the running system to it, but without
2830 making it the boot default. So if (say) the configuration locks up your
2931 machine, you can just reboot to get back to a working configuration.
@@ -31,7 +33,8 @@
3133 <para>
3234 There is also
3335<screen>
34−# nixos-rebuild boot</screen>
36+<prompt># </prompt>nixos-rebuild boot
37+</screen>
3538 to build the configuration and make it the boot default, but not switch to it
3639 now (so it will only take effect after the next reboot).
3740 </para>
@@ -39,7 +42,8 @@
3942 You can make your configuration show up in a different submenu of the GRUB 2
4043 boot screen by giving it a different <emphasis>profile name</emphasis>, e.g.
4144<screen>
42−# nixos-rebuild switch -p test </screen>
45+<prompt># </prompt>nixos-rebuild switch -p test
46+</screen>
4347 which causes the new configuration (and previous ones created using
4448 <literal>-p test</literal>) to show up in the GRUB submenu “NixOS - Profile
4549 'test'”. This can be useful to separate test configurations from
@@ -48,7 +52,8 @@
4852 <para>
4953 Finally, you can do
5054<screen>
51−$ nixos-rebuild build</screen>
55+<prompt>$ </prompt>nixos-rebuild build
56+</screen>
5257 to build the configuration but nothing more. This is useful to see whether
5358 everything compiles cleanly.
5459 </para>
@@ -58,8 +63,8 @@ $ nixos-rebuild build</screen>
5863 <emphasis>virtual machine</emphasis> that contains the desired configuration.
5964 Just do
6065<screen>
61−$ nixos-rebuild build-vm
62−$ ./result/bin/run-*-vm
66+<prompt>$ </prompt>nixos-rebuild build-vm
67+<prompt>$ </prompt>./result/bin/run-*-vm
6368</screen>
6469 The VM does not have any data from your host system, so your existing user
6570 accounts and home directories will not be available unless you have set
@@ -74,12 +79,12 @@ $ ./result/bin/run-*-vm
7479 guest. For instance, the following will forward host port 2222 to guest port
7580 22 (SSH):
7681<screen>
77−$ QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm
82+<prompt>$ </prompt>QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm
7883</screen>
7984 allowing you to log in via SSH (assuming you have set the appropriate
8085 passwords or SSH authorized keys):
8186<screen>
82−$ ssh -p 2222 localhost
87+<prompt>$ </prompt>ssh -p 2222 localhost
8388</screen>
8489 </para>
8590</chapter>
nixos/doc/manual/installation/installing-from-other-distro.xml+23−22
@@ -47,8 +47,8 @@
4747 Short version:
4848 </para>
4949<screen>
50−$ curl https://nixos.org/nix/install | sh
51−$ . $HOME/.nix-profile/etc/profile.d/nix.sh # …or open a fresh shell</screen>
50+<prompt>$ </prompt>curl https://nixos.org/nix/install | sh
51+<prompt>$ </prompt>. $HOME/.nix-profile/etc/profile.d/nix.sh # …or open a fresh shell</screen>
5252 <para>
5353 More details in the
5454 <link
@@ -65,14 +65,14 @@ $ . $HOME/.nix-profile/etc/profile.d/nix.sh # …or open a fresh shell</screen>
6565 the <literal>nixpkgs</literal> channel by default.
6666 </para>
6767<screen>
68−$ nix-channel --list
68+<prompt>$ </prompt>nix-channel --list
6969nixpkgs https://nixos.org/channels/nixpkgs-unstable</screen>
7070 <para>
7171 As that channel gets released without running the NixOS tests, it will be
7272 safer to use the <literal>nixos-*</literal> channels instead:
7373 </para>
7474<screen>
75−$ nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</replaceable> nixpkgs</screen>
75+<prompt>$ </prompt>nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</replaceable> nixpkgs</screen>
7676 <para>
7777 You may want to throw in a <literal>nix-channel --update</literal> for good
7878 measure.
@@ -89,7 +89,7 @@ $ nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</repla
8989 NixOS partition. They are installed by default on NixOS, but you don't have
9090 NixOS yet..
9191 </para>
92−<screen>$ nix-env -iE "_: with import &lt;nixpkgs/nixos&gt; { configuration = {}; }; with config.system.build; [ nixos-generate-config nixos-install nixos-enter manual.manpages ]"</screen>
92+<screen><prompt>$ </prompt>nix-env -iE "_: with import &lt;nixpkgs/nixos&gt; { configuration = {}; }; with config.system.build; [ nixos-generate-config nixos-install nixos-enter manual.manpages ]"</screen>
9393 </listitem>
9494 <listitem>
9595 <note>
@@ -116,7 +116,7 @@ $ nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</repla
116116 <para>
117117 Generate your NixOS configuration:
118118 </para>
119−<screen>$ sudo `which nixos-generate-config` --root /mnt</screen>
119+<screen><prompt>$ </prompt>sudo `which nixos-generate-config` --root /mnt</screen>
120120 <para>
121121 You'll probably want to edit the configuration files. Refer to the
122122 <literal>nixos-generate-config</literal> step in
@@ -148,8 +148,8 @@ $ nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</repla
148148 distribution:
149149 </para>
150150<screen>
151−$ sudo groupadd -g 30000 nixbld
152−$ sudo useradd -u 30000 -g nixbld -G nixbld nixbld</screen>
151+<prompt>$ </prompt>sudo groupadd -g 30000 nixbld
152+<prompt>$ </prompt>sudo useradd -u 30000 -g nixbld -G nixbld nixbld</screen>
153153 </listitem>
154154 <listitem>
155155 <para>
@@ -161,7 +161,7 @@ $ sudo useradd -u 30000 -g nixbld -G nixbld nixbld</screen>
161161 existing systems without the help of a rescue USB drive or similar.
162162 </para>
163163 </warning>
164−<screen>$ sudo PATH="$PATH" NIX_PATH="$NIX_PATH" `which nixos-install` --root /mnt</screen>
164+<screen><prompt>$ </prompt>sudo PATH="$PATH" NIX_PATH="$NIX_PATH" `which nixos-install` --root /mnt</screen>
165165 <para>
166166 Again, please refer to the <literal>nixos-install</literal> step in
167167 <xref linkend="sec-installation" /> for more information.
@@ -175,8 +175,8 @@ $ sudo useradd -u 30000 -g nixbld -G nixbld nixbld</screen>
175175 Optionally, you may want to clean up your non-NixOS distribution:
176176 </para>
177177<screen>
178−$ sudo userdel nixbld
179−$ sudo groupdel nixbld</screen>
178+<prompt>$ </prompt>sudo userdel nixbld
179+<prompt>$ </prompt>sudo groupdel nixbld</screen>
180180 <para>
181181 If you do not wish to keep the Nix package manager installed either, run
182182 something like <literal>sudo rm -rv ~/.nix-* /nix</literal> and remove the
@@ -193,7 +193,7 @@ $ sudo groupdel nixbld</screen>
193193 <para>
194194 Generate your NixOS configuration:
195195 </para>
196−<screen>$ sudo `which nixos-generate-config` --root /</screen>
196+<screen><prompt>$ </prompt>sudo `which nixos-generate-config` --root /</screen>
197197 <para>
198198 Note that this will place the generated configuration files in
199199 <literal>/etc/nixos</literal>. You'll probably want to edit the
@@ -212,21 +212,21 @@ $ sudo groupdel nixbld</screen>
212212 </para>
213213<programlisting>
214214<link linkend="opt-users.users._name__.initialHashedPassword">users.users.root.initialHashedPassword</link> = "";
215− </programlisting>
215+</programlisting>
216216 </listitem>
217217 <listitem>
218218 <para>
219219 Build the NixOS closure and install it in the <literal>system</literal>
220220 profile:
221221 </para>
222−<screen>$ nix-env -p /nix/var/nix/profiles/system -f '&lt;nixpkgs/nixos&gt;' -I nixos-config=/etc/nixos/configuration.nix -iA system</screen>
222+<screen><prompt>$ </prompt>nix-env -p /nix/var/nix/profiles/system -f '&lt;nixpkgs/nixos&gt;' -I nixos-config=/etc/nixos/configuration.nix -iA system</screen>
223223 </listitem>
224224 <listitem>
225225 <para>
226226 Change ownership of the <literal>/nix</literal> tree to root (since your
227227 Nix install was probably single user):
228228 </para>
229−<screen>$ sudo chown -R 0.0 /nix</screen>
229+<screen><prompt>$ </prompt>sudo chown -R 0.0 /nix</screen>
230230 </listitem>
231231 <listitem>
232232 <para>
@@ -284,16 +284,16 @@ $ sudo groupdel nixbld</screen>
284284 Let's create the files:
285285 </para>
286286<screen>
287−$ sudo touch /etc/NIXOS
288−$ sudo touch /etc/NIXOS_LUSTRATE
289− </screen>
287+<prompt>$ </prompt>sudo touch /etc/NIXOS
288+<prompt>$ </prompt>sudo touch /etc/NIXOS_LUSTRATE
289+</screen>
290290 <para>
291291 Let's also make sure the NixOS configuration files are kept once we reboot
292292 on NixOS:
293293 </para>
294294<screen>
295−$ echo etc/nixos | sudo tee -a /etc/NIXOS_LUSTRATE
296− </screen>
295+<prompt>$ </prompt>echo etc/nixos | sudo tee -a /etc/NIXOS_LUSTRATE
296+</screen>
297297 </listitem>
298298 <listitem>
299299 <para>
@@ -312,8 +312,9 @@ $ echo etc/nixos | sudo tee -a /etc/NIXOS_LUSTRATE
312312 </para>
313313 </warning>
314314<screen>
315−$ sudo mv -v /boot /boot.bak &amp;&amp;
316− sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot</screen>
315+<prompt>$ </prompt>sudo mv -v /boot /boot.bak &amp;&amp;
316+sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot
317+</screen>
317318 <para>
318319 Cross your fingers, reboot, hopefully you should get a NixOS prompt!
319320 </para>
nixos/doc/manual/installation/installing-usb.xml+5−5
@@ -15,16 +15,16 @@
1515 <note>
1616 <title>On macOS</title>
1717 <para>
18−<programlisting>
19−$ diskutil list
18+<screen>
19+<prompt>$ </prompt>diskutil list
2020[..]
2121/dev/diskN (external, physical):
2222 #: TYPE NAME SIZE IDENTIFIER
2323[..]
24−$ diskutil unmountDisk diskN
24+<prompt>$ </prompt>diskutil unmountDisk diskN
2525Unmount of all volumes on diskN was successful
26−$ sudo dd if=nix.iso of=/dev/rdiskN
27−</programlisting>
26+<prompt>$ </prompt>sudo dd if=nix.iso of=/dev/rdiskN
27+</screen>
2828 Using the 'raw' <command>rdiskN</command> device instead of
2929 <command>diskN</command> completes in minutes instead of hours. After
3030 <command>dd</command> completes, a GUI dialog "The disk you inserted was
nixos/doc/manual/installation/installing.xml+44−44
@@ -110,7 +110,7 @@
110110 <listitem>
111111 <para>
112112 Create a <emphasis>GPT</emphasis> partition table.
113−<screen language="commands"># parted /dev/sda -- mklabel gpt</screen>
113+<screen language="commands"><prompt># </prompt>parted /dev/sda -- mklabel gpt</screen>
114114 </para>
115115 </listitem>
116116 <listitem>
@@ -118,14 +118,14 @@
118118 Add the <emphasis>root</emphasis> partition. This will fill the disk
119119 except for the end part, where the swap will live, and the space left in
120120 front (512MiB) which will be used by the boot partition.
121−<screen language="commands"># parted /dev/sda -- mkpart primary 512MiB -8GiB</screen>
121+<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart primary 512MiB -8GiB</screen>
122122 </para>
123123 </listitem>
124124 <listitem>
125125 <para>
126126 Next, add a <emphasis>swap</emphasis> partition. The size required will
127127 vary according to needs, here a 8GiB one is created.
128−<screen language="commands"># parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen>
128+<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen>
129129 <note>
130130 <para>
131131 The swap partition size rules are no different than for other Linux
@@ -140,8 +140,8 @@
140140 the ESP (EFI system partition) as its <emphasis>/boot</emphasis>
141141 partition. It uses the initially reserved 512MiB at the start of the
142142 disk.
143−<screen language="commands"># parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
144−# parted /dev/sda -- set 3 boot on</screen>
143+<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
144+<prompt># </prompt>parted /dev/sda -- set 3 boot on</screen>
145145 </para>
146146 </listitem>
147147 </orderedlist>
@@ -172,21 +172,21 @@
172172 <listitem>
173173 <para>
174174 Create a <emphasis>MBR</emphasis> partition table.
175−<screen language="commands"># parted /dev/sda -- mklabel msdos</screen>
175+<screen language="commands"><prompt># </prompt>parted /dev/sda -- mklabel msdos</screen>
176176 </para>
177177 </listitem>
178178 <listitem>
179179 <para>
180180 Add the <emphasis>root</emphasis> partition. This will fill the the disk
181181 except for the end part, where the swap will live.
182−<screen language="commands"># parted /dev/sda -- mkpart primary 1MiB -8GiB</screen>
182+<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart primary 1MiB -8GiB</screen>
183183 </para>
184184 </listitem>
185185 <listitem>
186186 <para>
187187 Finally, add a <emphasis>swap</emphasis> partition. The size required
188188 will vary according to needs, here a 8GiB one is created.
189−<screen language="commands"># parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen>
189+<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen>
190190 <note>
191191 <para>
192192 The swap partition size rules are no different than for other Linux
@@ -218,7 +218,7 @@
218218 since this makes the file system configuration independent from device
219219 changes. For example:
220220<screen>
221−# mkfs.ext4 -L nixos /dev/sda1</screen>
221+<prompt># </prompt>mkfs.ext4 -L nixos /dev/sda1</screen>
222222 </para>
223223 </listitem>
224224 <listitem>
@@ -227,7 +227,7 @@
227227 recommended to assign a label to the swap partition: <option>-L
228228 <replaceable>label</replaceable></option>. For example:
229229<screen>
230−# mkswap -L swap /dev/sda2</screen>
230+<prompt># </prompt>mkswap -L swap /dev/sda2</screen>
231231 </para>
232232 </listitem>
233233 <listitem>
@@ -242,7 +242,7 @@
242242 it’s recommended to assign a label to the boot partition:
243243 <option>-n <replaceable>label</replaceable></option>. For example:
244244<screen>
245−# mkfs.fat -F 32 -n boot /dev/sda3</screen>
245+<prompt># </prompt>mkfs.fat -F 32 -n boot /dev/sda3</screen>
246246 </para>
247247 </listitem>
248248 </varlistentry>
@@ -273,7 +273,7 @@
273273 Mount the target file system on which NixOS should be installed on
274274 <filename>/mnt</filename>, e.g.
275275<screen>
276−# mount /dev/disk/by-label/nixos /mnt
276+<prompt># </prompt>mount /dev/disk/by-label/nixos /mnt
277277</screen>
278278 </para>
279279 </listitem>
@@ -287,8 +287,8 @@
287287 <para>
288288 Mount the boot file system on <filename>/mnt/boot</filename>, e.g.
289289<screen>
290−# mkdir -p /mnt/boot
291−# mount /dev/disk/by-label/boot /mnt/boot
290+<prompt># </prompt>mkdir -p /mnt/boot
291+<prompt># </prompt>mount /dev/disk/by-label/boot /mnt/boot
292292</screen>
293293 </para>
294294 </listitem>
@@ -303,7 +303,7 @@
303303 the build actions that it may spawn) may need quite a bit of RAM,
304304 depending on your configuration.
305305<screen>
306−# swapon /dev/sda2</screen>
306+<prompt># </prompt>swapon /dev/sda2</screen>
307307 </para>
308308 </listitem>
309309 <listitem>
@@ -325,11 +325,11 @@
325325 The command <command>nixos-generate-config</command> can generate an
326326 initial configuration file for you:
327327<screen>
328−# nixos-generate-config --root /mnt</screen>
328+<prompt># </prompt>nixos-generate-config --root /mnt</screen>
329329 You should then edit <filename>/mnt/etc/nixos/configuration.nix</filename>
330330 to suit your needs:
331331<screen>
332−# nano /mnt/etc/nixos/configuration.nix
332+<prompt># </prompt>nano /mnt/etc/nixos/configuration.nix
333333</screen>
334334 If you’re using the graphical ISO image, other editors may be available
335335 (such as <command>vim</command>). If you have network access, you can also
@@ -412,7 +412,7 @@
412412 <para>
413413 Do the installation:
414414<screen>
415−# nixos-install</screen>
415+<prompt># </prompt>nixos-install</screen>
416416 Cross fingers. If this fails due to a temporary problem (such as a network
417417 issue while downloading binaries from the NixOS binary cache), you can
418418 just re-run <command>nixos-install</command>. Otherwise, fix your
@@ -439,7 +439,7 @@ Retype new UNIX password: ***</screen>
439439 <para>
440440 If everything went well:
441441<screen>
442−# reboot</screen>
442+<prompt># </prompt>reboot</screen>
443443 </para>
444444 </listitem>
445445 <listitem>
@@ -460,16 +460,16 @@ Retype new UNIX password: ***</screen>
460460 You’ll probably want to create some user accounts as well, which can be
461461 done with <command>useradd</command>:
462462<screen>
463−$ useradd -c 'Eelco Dolstra' -m eelco
464−$ passwd eelco</screen>
463+<prompt>$ </prompt>useradd -c 'Eelco Dolstra' -m eelco
464+<prompt>$ </prompt>passwd eelco</screen>
465465 </para>
466466 <para>
467467 You may also want to install some software. For instance,
468468<screen>
469−$ nix-env -qa \*</screen>
469+<prompt>$ </prompt>nix-env -qa \*</screen>
470470 shows what packages are available, and
471471<screen>
472−$ nix-env -i w3m</screen>
472+<prompt>$ </prompt>nix-env -i w3m</screen>
473473 install the <literal>w3m</literal> browser.
474474 </para>
475475 </listitem>
@@ -489,19 +489,19 @@ $ nix-env -i w3m</screen>
489489 <example xml:id="ex-partition-scheme-MBR">
490490 <title>Example partition schemes for NixOS on <filename>/dev/sda</filename> (MBR)</title>
491491<screen language="commands">
492−# parted /dev/sda -- mklabel msdos
493−# parted /dev/sda -- mkpart primary 1MiB -8GiB
494−# parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen>
492+<prompt># </prompt>parted /dev/sda -- mklabel msdos
493+<prompt># </prompt>parted /dev/sda -- mkpart primary 1MiB -8GiB
494+<prompt># </prompt>parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen>
495495 </example>
496496
497497 <example xml:id="ex-partition-scheme-UEFI">
498498 <title>Example partition schemes for NixOS on <filename>/dev/sda</filename> (UEFI)</title>
499499<screen language="commands">
500−# parted /dev/sda -- mklabel gpt
501−# parted /dev/sda -- mkpart primary 512MiB -8GiB
502−# parted /dev/sda -- mkpart primary linux-swap -8GiB 100%
503−# parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
504−# parted /dev/sda -- set 3 boot on</screen>
500+<prompt># </prompt>parted /dev/sda -- mklabel gpt
501+<prompt># </prompt>parted /dev/sda -- mkpart primary 512MiB -8GiB
502+<prompt># </prompt>parted /dev/sda -- mkpart primary linux-swap -8GiB 100%
503+<prompt># </prompt>parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
504+<prompt># </prompt>parted /dev/sda -- set 3 boot on</screen>
505505 </example>
506506
507507 <example xml:id="ex-install-sequence">
@@ -509,23 +509,23 @@ $ nix-env -i w3m</screen>
509509 <para>
510510 With a partitioned disk.
511511<screen language="commands">
512−# mkfs.ext4 -L nixos /dev/sda1
513−# mkswap -L swap /dev/sda2
514−# swapon /dev/sda2
515−# mkfs.fat -F 32 -n boot /dev/sda3 # <lineannotation>(for UEFI systems only)</lineannotation>
516−# mount /dev/disk/by-label/nixos /mnt
517−# mkdir -p /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation>
518−# mount /dev/disk/by-label/boot /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation>
519−# nixos-generate-config --root /mnt
520−# nano /mnt/etc/nixos/configuration.nix
521−# nixos-install
522−# reboot</screen>
512+<prompt># </prompt>mkfs.ext4 -L nixos /dev/sda1
513+<prompt># </prompt>mkswap -L swap /dev/sda2
514+<prompt># </prompt>swapon /dev/sda2
515+<prompt># </prompt>mkfs.fat -F 32 -n boot /dev/sda3 # <lineannotation>(for UEFI systems only)</lineannotation>
516+<prompt># </prompt>mount /dev/disk/by-label/nixos /mnt
517+<prompt># </prompt>mkdir -p /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation>
518+<prompt># </prompt>mount /dev/disk/by-label/boot /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation>
519+<prompt># </prompt>nixos-generate-config --root /mnt
520+<prompt># </prompt>nano /mnt/etc/nixos/configuration.nix
521+<prompt># </prompt>nixos-install
522+<prompt># </prompt>reboot</screen>
523523 </para>
524524 </example>
525525
526526 <example xml:id='ex-config'>
527527 <title>NixOS Configuration</title>
528−<screen>
528+<programlisting>
529529{ config, pkgs, ... }: {
530530 imports = [
531531 # Include the results of the hardware scan.
@@ -543,7 +543,7 @@ $ nix-env -i w3m</screen>
543543 # Enable the OpenSSH server.
544544 services.sshd.enable = true;
545545}
546− </screen>
546+</programlisting>
547547 </example>
548548 </section>
549549 <section xml:id="sec-installation-additional-notes">
nixos/doc/manual/man-nixos-generate-config.xml+5−5
@@ -13,18 +13,18 @@
1313 </refnamediv>
1414 <refsynopsisdiv>
1515 <cmdsynopsis>
16− <command>nixos-generate-config</command>
16+ <command>nixos-generate-config</command>
1717 <arg>
1818 <option>--force</option>
1919 </arg>
20−
20+
2121 <arg>
2222 <arg choice='plain'>
2323 <option>--root</option>
2424 </arg>
2525 <replaceable>root</replaceable>
2626 </arg>
27−
27+
2828 <arg>
2929 <arg choice='plain'>
3030 <option>--dir</option>
@@ -154,7 +154,7 @@
154154 file systems on <filename>/mnt</filename> and
155155 <filename>/mnt/boot</filename>, you would run:
156156<screen>
157−$ nixos-generate-config --root /mnt
157+<prompt>$ </prompt>nixos-generate-config --root /mnt
158158</screen>
159159 The resulting file
160160 <filename>/mnt/etc/nixos/hardware-configuration.nix</filename> might look
@@ -204,7 +204,7 @@ $ nixos-generate-config --root /mnt
204204 <para>
205205 After installation, if your hardware configuration changes, you can run:
206206<screen>
207−$ nixos-generate-config
207+<prompt>$ </prompt>nixos-generate-config
208208</screen>
209209 to update <filename>/etc/nixos/hardware-configuration.nix</filename>. Your
210210 <filename>/etc/nixos/configuration.nix</filename> will
nixos/doc/manual/man-nixos-install.xml+19−19
@@ -13,72 +13,72 @@
1313 </refnamediv>
1414 <refsynopsisdiv>
1515 <cmdsynopsis>
16− <command>nixos-install</command>
16+ <command>nixos-install</command>
1717 <arg>
1818 <arg choice='plain'>
1919 <option>-I</option>
2020 </arg>
2121 <replaceable>path</replaceable>
2222 </arg>
23−
23+
2424 <arg>
2525 <arg choice='plain'>
2626 <option>--root</option>
2727 </arg>
2828 <replaceable>root</replaceable>
2929 </arg>
30−
30+
3131 <arg>
3232 <arg choice='plain'>
3333 <option>--system</option>
3434 </arg>
3535 <replaceable>path</replaceable>
3636 </arg>
37−
37+
3838 <arg>
3939 <arg choice='plain'>
4040 <option>--no-channel-copy</option>
4141 </arg>
4242 </arg>
43−
43+
4444 <arg>
4545 <arg choice='plain'>
4646 <option>--no-root-passwd</option>
4747 </arg>
4848 </arg>
49−
49+
5050 <arg>
5151 <arg choice='plain'>
5252 <option>--no-bootloader</option>
5353 </arg>
5454 </arg>
55−
55+
5656 <arg>
57− <group choice='req'>
57+ <group choice='req'>
5858 <arg choice='plain'>
5959 <option>--max-jobs</option>
6060 </arg>
61−
61+
6262 <arg choice='plain'>
6363 <option>-j</option>
6464 </arg>
6565 </group> <replaceable>number</replaceable>
6666 </arg>
67−
67+
6868 <arg>
6969 <option>--cores</option> <replaceable>number</replaceable>
7070 </arg>
71−
71+
7272 <arg>
7373 <option>--option</option> <replaceable>name</replaceable> <replaceable>value</replaceable>
7474 </arg>
75−
75+
7676 <arg>
7777 <arg choice='plain'>
7878 <option>--show-trace</option>
7979 </arg>
8080 </arg>
81−
81+
8282 <arg>
8383 <arg choice='plain'>
8484 <option>--help</option>
@@ -255,12 +255,12 @@
255255 on an <literal>ext4</literal> file system created in
256256 <filename>/dev/sda1</filename>:
257257<screen>
258−$ mkfs.ext4 /dev/sda1
259−$ mount /dev/sda1 /mnt
260−$ nixos-generate-config --root /mnt
261−$ # edit /mnt/etc/nixos/configuration.nix
262−$ nixos-install
263−$ reboot
258+<prompt>$ </prompt>mkfs.ext4 /dev/sda1
259+<prompt>$ </prompt>mount /dev/sda1 /mnt
260+<prompt>$ </prompt>nixos-generate-config --root /mnt
261+<prompt>$ </prompt># edit /mnt/etc/nixos/configuration.nix
262+<prompt>$ </prompt>nixos-install
263+<prompt>$ </prompt>reboot
264264</screen>
265265 </para>
266266 </refsection>
nixos/doc/manual/man-nixos-option.xml+6−6
@@ -13,19 +13,19 @@
1313 </refnamediv>
1414 <refsynopsisdiv>
1515 <cmdsynopsis>
16− <command>nixos-option</command>
16+ <command>nixos-option</command>
1717 <arg>
1818 <option>-I</option> <replaceable>path</replaceable>
1919 </arg>
20−
20+
2121 <arg>
2222 <option>--verbose</option>
2323 </arg>
24−
24+
2525 <arg>
2626 <option>--xml</option>
2727 </arg>
28−
28+
2929 <arg choice="plain">
3030 <replaceable>option.name</replaceable>
3131 </arg>
@@ -103,13 +103,13 @@
103103 <title>Examples</title>
104104 <para>
105105 Investigate option values:
106−<screen>$ nixos-option boot.loader
106+<screen><prompt>$ </prompt>nixos-option boot.loader
107107This attribute set contains:
108108generationsDir
109109grub
110110initScript
111111
112−$ nixos-option boot.loader.grub.enable
112+<prompt>$ </prompt>nixos-option boot.loader.grub.enable
113113Value:
114114true
115115
nixos/doc/manual/man-nixos-rebuild.xml+20−20
@@ -13,39 +13,39 @@
1313 </refnamediv>
1414 <refsynopsisdiv>
1515 <cmdsynopsis>
16− <command>nixos-rebuild</command><group choice='req'>
16+ <command>nixos-rebuild</command><group choice='req'>
1717 <arg choice='plain'>
1818 <option>switch</option>
1919 </arg>
20−
20+
2121 <arg choice='plain'>
2222 <option>boot</option>
2323 </arg>
24−
24+
2525 <arg choice='plain'>
2626 <option>test</option>
2727 </arg>
28−
28+
2929 <arg choice='plain'>
3030 <option>build</option>
3131 </arg>
32−
32+
3333 <arg choice='plain'>
3434 <option>dry-build</option>
3535 </arg>
36−
36+
3737 <arg choice='plain'>
3838 <option>dry-activate</option>
3939 </arg>
40−
40+
4141 <arg choice='plain'>
4242 <option>edit</option>
4343 </arg>
44−
44+
4545 <arg choice='plain'>
4646 <option>build-vm</option>
4747 </arg>
48−
48+
4949 <arg choice='plain'>
5050 <option>build-vm-with-bootloader</option>
5151 </arg>
@@ -54,33 +54,33 @@
5454 <arg>
5555 <option>--upgrade</option>
5656 </arg>
57−
57+
5858 <arg>
5959 <option>--install-bootloader</option>
6060 </arg>
61−
61+
6262 <arg>
6363 <option>--no-build-nix</option>
6464 </arg>
65−
65+
6666 <arg>
6767 <option>--fast</option>
6868 </arg>
69−
69+
7070 <arg>
7171 <option>--rollback</option>
7272 </arg>
73−
73+
7474 <arg>
7575 <option>--builders</option> <replaceable>builder-spec</replaceable>
7676 </arg>
7777 <sbr />
7878 <arg>
79− <group choice='req'>
79+ <group choice='req'>
8080 <arg choice='plain'>
8181 <option>--profile-name</option>
8282 </arg>
83−
83+
8484 <arg choice='plain'>
8585 <option>-p</option>
8686 </arg>
@@ -160,7 +160,7 @@
160160 the current directory, which points to the output of the top-level
161161 “system” derivation. This is essentially the same as doing
162162<screen>
163−$ nix-build /path/to/nixpkgs/nixos -A system
163+<prompt>$ </prompt>nix-build /path/to/nixpkgs/nixos -A system
164164</screen>
165165 Note that you do not need to be <literal>root</literal> to run
166166 <command>nixos-rebuild build</command>.
@@ -215,8 +215,8 @@ $ nix-build /path/to/nixpkgs/nixos -A system
215215 at the script that starts the VM. Thus, to test a NixOS configuration in
216216 a virtual machine, you should do the following:
217217<screen>
218−$ nixos-rebuild build-vm
219−$ ./result/bin/run-*-vm
218+<prompt>$ </prompt>nixos-rebuild build-vm
219+<prompt>$ </prompt>./result/bin/run-*-vm
220220</screen>
221221 </para>
222222 <para>
@@ -375,7 +375,7 @@ $ ./result/bin/run-*-vm
375375 <filename>test.nix</filename> without affecting the default system
376376 profile, you would do:
377377<screen>
378−$ nixos-rebuild switch -p test -I nixos-config=./test.nix
378+<prompt>$ </prompt>nixos-rebuild switch -p test -I nixos-config=./test.nix
379379</screen>
380380 The new configuration will appear in the GRUB 2 submenu “NixOS -
381381 Profile 'test'”.
nixos/doc/manual/release-notes/rl-1509.xml+1−1
@@ -627,7 +627,7 @@ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA haskellPackages.pandoc
627627 In case of an infinite loop, use the <command>--show-trace</command>
628628 command line argument and read the line just above the error message.
629629<screen>
630−$ nixos-rebuild build --show-trace
630+<prompt>$ </prompt>nixos-rebuild build --show-trace
631631…
632632while evaluating the module argument `pkgs' in "/etc/nixos/my-module.nix":
633633infinite recursion encountered
nixos/doc/manual/release-notes/rl-1703.xml+8−8
@@ -626,17 +626,17 @@
626626 xlink:href="https://nixos.org/nixpkgs/manual/#sec-overlays-install">
627627 overlays</link>. For example, the following code:
628628<programlisting>
629− let
630− pkgs = import &lt;nixpkgs&gt; {};
631− in
632− pkgs.overridePackages (self: super: ...)
629+let
630+ pkgs = import &lt;nixpkgs&gt; {};
631+in
632+ pkgs.overridePackages (self: super: ...)
633633</programlisting>
634634 should be replaced by:
635635<programlisting>
636− let
637− pkgs = import &lt;nixpkgs&gt; {};
638− in
639− import pkgs.path { overlays = [(self: super: ...)]; }
636+let
637+ pkgs = import &lt;nixpkgs&gt; {};
638+in
639+ import pkgs.path { overlays = [(self: super: ...)]; }
640640</programlisting>
641641 </para>
642642 </listitem>
nixos/modules/services/databases/foundationdb.xml+19−19
@@ -47,14 +47,14 @@ services.foundationdb.package = pkgs.foundationdb52; # FoundationDB 5.2.x
4747 After running <command>nixos-rebuild</command>, you can verify whether
4848 FoundationDB is running by executing <command>fdbcli</command> (which is
4949 added to <option>environment.systemPackages</option>):
50−<programlisting>
51−$ sudo -u foundationdb fdbcli
50+<screen>
51+<prompt>$ </prompt>sudo -u foundationdb fdbcli
5252Using cluster file `/etc/foundationdb/fdb.cluster'.
5353
5454The database is available.
5555
5656Welcome to the fdbcli. For help, type `help'.
57−fdb> status
57+<prompt>fdb> </prompt>status
5858
5959Using cluster file `/etc/foundationdb/fdb.cluster'.
6060
@@ -72,8 +72,8 @@ Cluster:
7272
7373...
7474
75−fdb>
76−</programlisting>
75+<prompt>fdb></prompt>
76+</screen>
7777 </para>
7878
7979 <para>
@@ -82,8 +82,8 @@ fdb>
8282 cluster status, as a quick example. (This example uses
8383 <command>nix-shell</command> shebang support to automatically supply the
8484 necessary Python modules).
85−<programlisting>
86−a@link> cat fdb-status.py
85+<screen>
86+<prompt>a@link> </prompt>cat fdb-status.py
8787#! /usr/bin/env nix-shell
8888#! nix-shell -i python -p python pythonPackages.foundationdb52
8989
@@ -103,11 +103,11 @@ def main():
103103
104104if __name__ == "__main__":
105105 main()
106−a@link> chmod +x fdb-status.py
107−a@link> ./fdb-status.py
106+<prompt>a@link> </prompt>chmod +x fdb-status.py
107+<prompt>a@link> </prompt>./fdb-status.py
108108FoundationDB available: True
109−a@link>
110−</programlisting>
109+<prompt>a@link></prompt>
110+</screen>
111111 </para>
112112
113113 <para>
@@ -266,10 +266,10 @@ services.foundationdb.dataDir = "/data/fdb";
266266 <emphasis>every</emphasis> node a coordinator automatically:
267267 </para>
268268
269−<programlisting>
270−fdbcli> configure double ssd
271−fdbcli> coordinators auto
272−</programlisting>
269+<screen>
270+<prompt>fdbcli> </prompt>configure double ssd
271+<prompt>fdbcli> </prompt>coordinators auto
272+</screen>
273273
274274 <para>
275275 This will transparently update all the servers within seconds, and
@@ -386,10 +386,10 @@ services.foundationdb.extraReadWritePaths = [ "/opt/fdb-backups" ];
386386 You can now perform a backup:
387387 </para>
388388
389−<programlisting>
390−$ sudo -u foundationdb fdbbackup start -t default -d file:///opt/fdb-backups
391−$ sudo -u foundationdb fdbbackup status -t default
392−</programlisting>
389+<screen>
390+<prompt>$ </prompt>sudo -u foundationdb fdbbackup start -t default -d file:///opt/fdb-backups
391+<prompt>$ </prompt>sudo -u foundationdb fdbbackup status -t default
392+</screen>
393393 </section>
394394 <section xml:id="module-services-foundationdb-limitations">
395395 <title>Known limitations</title>
nixos/modules/services/databases/postgresql.xml+2−2
@@ -42,11 +42,11 @@
4242whether PostgreSQL works by running <command>psql</command>:
4343
4444<screen>
45−$ psql
45+<prompt>$ </prompt>psql
4646psql (9.2.9)
4747Type "help" for help.
4848
49−alice=>
49+<prompt>alice=></prompt>
5050</screen>
5151-->
5252
nixos/modules/services/desktops/flatpak.xml+11−11
@@ -21,7 +21,7 @@
2121 <filename>configuration.nix</filename>:
2222<programlisting>
2323 <xref linkend="opt-services.flatpak.enable"/> = true;
24− </programlisting>
24+</programlisting>
2525 </para>
2626 <para>
2727 For the sandboxed apps to work correctly, desktop integration portals need to
@@ -30,27 +30,27 @@
3030 <filename>configuration.nix</filename>:
3131<programlisting>
3232 <xref linkend="opt-services.flatpak.extraPortals"/> = [ pkgs.xdg-desktop-portal-gtk ];
33− </programlisting>
33+</programlisting>
3434 </para>
3535 <para>
3636 Then, you will need to add a repository, for example,
3737 <link xlink:href="https://github.com/flatpak/flatpak/wiki">Flathub</link>,
3838 either using the following commands:
39−<programlisting>
40− flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
41− flatpak update
42− </programlisting>
39+<screen>
40+<prompt>$ </prompt>flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
41+<prompt>$ </prompt>flatpak update
42+</screen>
4343 or by opening the
4444 <link xlink:href="https://flathub.org/repo/flathub.flatpakrepo">repository
4545 file</link> in GNOME Software.
4646 </para>
4747 <para>
4848 Finally, you can search and install programs:
49−<programlisting>
50− flatpak search bustle
51− flatpak install flathub org.freedesktop.Bustle
52− flatpak run org.freedesktop.Bustle
53− </programlisting>
49+<screen>
50+<prompt>$ </prompt>flatpak search bustle
51+<prompt>$ </prompt>flatpak install flathub org.freedesktop.Bustle
52+<prompt>$ </prompt>flatpak run org.freedesktop.Bustle
53+</screen>
5454 Again, GNOME Software offers graphical interface for these tasks.
5555 </para>
5656</chapter>
nixos/modules/services/editors/emacs.xml+5−5
@@ -238,8 +238,8 @@ in
238238 <para>
239239 You can check that it works by executing this in a terminal:
240240<screen>
241−$ nix-build emacs.nix
242−$ ./result/bin/emacs -q
241+<prompt>$ </prompt>nix-build emacs.nix
242+<prompt>$ </prompt>./result/bin/emacs -q
243243</screen>
244244 and then typing <literal>M-x package-initialize</literal>. Check that you
245245 can use all the packages you want in this Emacs instance. For example, try
@@ -403,9 +403,9 @@ in [...]
403403 <para>
404404 To start the daemon, execute the following:
405405<screen>
406−$ nixos-rebuild switch # to activate the new configuration.nix
407−$ systemctl --user daemon-reload # to force systemd reload
408−$ systemctl --user start emacs.service # to start the Emacs daemon
406+<prompt>$ </prompt>nixos-rebuild switch # to activate the new configuration.nix
407+<prompt>$ </prompt>systemctl --user daemon-reload # to force systemd reload
408+<prompt>$ </prompt>systemctl --user start emacs.service # to start the Emacs daemon
409409</screen>
410410 The server should now be ready to serve Emacs clients.
411411 </para>
nixos/modules/services/misc/gitlab.xml+6−6
@@ -138,13 +138,13 @@ services.gitlab = {
138138
139139 <para>
140140 For example, to backup a Gitlab instance:
141−<programlisting>
142−$ sudo -u git -H gitlab-rake gitlab:backup:create
143−</programlisting>
141+<screen>
142+<prompt>$ </prompt>sudo -u git -H gitlab-rake gitlab:backup:create
143+</screen>
144144 A list of all availabe rake tasks can be obtained by running:
145−<programlisting>
146−$ sudo -u git -H gitlab-rake -T
147−</programlisting>
145+<screen>
146+<prompt>$ </prompt>sudo -u git -H gitlab-rake -T
147+</screen>
148148 </para>
149149 </section>
150150</chapter>
nixos/modules/services/misc/taskserver/doc.xml+1−1
@@ -105,7 +105,7 @@
105105 Now in order to import the <literal>alice</literal> user to another machine
106106 <literal>alicebox</literal>, all we need to do is something like this:
107107<screen>
108−$ ssh server nixos-taskserver user export my-company alice | sh
108+<prompt>$ </prompt>ssh server nixos-taskserver user export my-company alice | sh
109109</screen>
110110 Of course, if no SSH daemon is available on the server you can also copy
111111 &amp; paste it directly into a shell.
nixos/modules/services/monitoring/prometheus/exporters.xml+55−55
@@ -112,65 +112,65 @@
112112 directory, which will be called postfix.nix and contains all exporter
113113 specific options and configuration:
114114<programlisting>
115− # nixpgs/nixos/modules/services/prometheus/exporters/postfix.nix
116− { config, lib, pkgs }:
115+# nixpgs/nixos/modules/services/prometheus/exporters/postfix.nix
116+{ config, lib, pkgs }:
117117
118− with lib;
118+with lib;
119119
120− let
121− # for convenience we define cfg here
122− cfg = config.services.prometheus.exporters.postfix;
123− in
124− {
125− port = 9154; # The postfix exporter listens on this port by default
120+let
121+ # for convenience we define cfg here
122+ cfg = config.services.prometheus.exporters.postfix;
123+in
124+{
125+ port = 9154; # The postfix exporter listens on this port by default
126126
127− # `extraOpts` is an attribute set which contains additional options
128− # (and optional overrides for default options).
129− # Note that this attribute is optional.
130− extraOpts = {
131− telemetryPath = mkOption {
132− type = types.str;
133− default = "/metrics";
134− description = ''
135− Path under which to expose metrics.
136− '';
137− };
138− logfilePath = mkOption {
139− type = types.path;
140− default = /var/log/postfix_exporter_input.log;
141− example = /var/log/mail.log;
142− description = ''
143− Path where Postfix writes log entries.
144− This file will be truncated by this exporter!
145− '';
146− };
147− showqPath = mkOption {
148− type = types.path;
149− default = /var/spool/postfix/public/showq;
150− example = /var/lib/postfix/queue/public/showq;
151− description = ''
152− Path at which Postfix places its showq socket.
153− '';
154− };
155− };
127+ # `extraOpts` is an attribute set which contains additional options
128+ # (and optional overrides for default options).
129+ # Note that this attribute is optional.
130+ extraOpts = {
131+ telemetryPath = mkOption {
132+ type = types.str;
133+ default = "/metrics";
134+ description = ''
135+ Path under which to expose metrics.
136+ '';
137+ };
138+ logfilePath = mkOption {
139+ type = types.path;
140+ default = /var/log/postfix_exporter_input.log;
141+ example = /var/log/mail.log;
142+ description = ''
143+ Path where Postfix writes log entries.
144+ This file will be truncated by this exporter!
145+ '';
146+ };
147+ showqPath = mkOption {
148+ type = types.path;
149+ default = /var/spool/postfix/public/showq;
150+ example = /var/lib/postfix/queue/public/showq;
151+ description = ''
152+ Path at which Postfix places its showq socket.
153+ '';
154+ };
155+ };
156156
157− # `serviceOpts` is an attribute set which contains configuration
158− # for the exporter's systemd service. One of
159− # `serviceOpts.script` and `serviceOpts.serviceConfig.ExecStart`
160− # has to be specified here. This will be merged with the default
161− # service confiuration.
162− serviceOpts = {
163− serviceConfig = {
164− ExecStart = ''
165− ${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
166− --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
167− --web.telemetry-path ${cfg.telemetryPath} \
168− ${concatStringsSep " \\\n " cfg.extraFlags}
169− '';
170− };
171− };
172− }
173− </programlisting>
157+ # `serviceOpts` is an attribute set which contains configuration
158+ # for the exporter's systemd service. One of
159+ # `serviceOpts.script` and `serviceOpts.serviceConfig.ExecStart`
160+ # has to be specified here. This will be merged with the default
161+ # service confiuration.
162+ serviceOpts = {
163+ serviceConfig = {
164+ ExecStart = ''
165+ ${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
166+ --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
167+ --web.telemetry-path ${cfg.telemetryPath} \
168+ ${concatStringsSep " \\\n " cfg.extraFlags}
169+ '';
170+ };
171+ };
172+}
173+</programlisting>
174174 </para>
175175 </listitem>
176176 <listitem>
nixos/modules/services/network-filesystems/samba.nix+4−4
@@ -86,10 +86,10 @@ in
8686
8787 <note>
8888 <para>If you use the firewall consider adding the following:</para>
89− <programlisting>
90− networking.firewall.allowedTCPPorts = [ 139 445 ];
91− networking.firewall.allowedUDPPorts = [ 137 138 ];
92− </programlisting>
89+ <programlisting>
90+ networking.firewall.allowedTCPPorts = [ 139 445 ];
91+ networking.firewall.allowedUDPPorts = [ 137 138 ];
92+ </programlisting>
9393 </note>
9494 '';
9595 };
nixos/modules/services/networking/dnscrypt-proxy.xml+4−4
@@ -18,7 +18,7 @@
1818 To enable the client proxy, set
1919<programlisting>
2020<xref linkend="opt-services.dnscrypt-proxy.enable"/> = true;
21− </programlisting>
21+</programlisting>
2222 </para>
2323
2424 <para>
@@ -36,7 +36,7 @@
3636 the other client to it:
3737<programlisting>
3838<xref linkend="opt-services.dnscrypt-proxy.localPort"/> = 43;
39− </programlisting>
39+</programlisting>
4040 </para>
4141
4242 <sect2 xml:id="sec-dnscrypt-proxy-forwarder-dsnmasq">
@@ -47,7 +47,7 @@
4747 <xref linkend="opt-services.dnsmasq.enable"/> = true;
4848 <xref linkend="opt-services.dnsmasq.servers"/> = [ "127.0.0.1#43" ];
4949}
50− </programlisting>
50+</programlisting>
5151 </para>
5252 </sect2>
5353
@@ -59,7 +59,7 @@
5959 <xref linkend="opt-services.unbound.enable"/> = true;
6060 <xref linkend="opt-services.unbound.forwardAddresses"/> = [ "127.0.0.1@43" ];
6161}
62− </programlisting>
62+</programlisting>
6363 </para>
6464 </sect2>
6565 </sect1>
nixos/modules/services/networking/smokeping.nix+11−11
@@ -101,17 +101,17 @@ in
101101 '';
102102 example = literalExample ''
103103 # near constant pings.
104− step = 30
105− pings = 20
106− # consfn mrhb steps total
107− AVERAGE 0.5 1 10080
108− AVERAGE 0.5 12 43200
109− MIN 0.5 12 43200
110− MAX 0.5 12 43200
111− AVERAGE 0.5 144 7200
112− MAX 0.5 144 7200
113− MIN 0.5 144 7200
114− '';
104+ step = 30
105+ pings = 20
106+ # consfn mrhb steps total
107+ AVERAGE 0.5 1 10080
108+ AVERAGE 0.5 12 43200
109+ MIN 0.5 12 43200
110+ MAX 0.5 12 43200
111+ AVERAGE 0.5 144 7200
112+ MAX 0.5 144 7200
113+ MIN 0.5 144 7200
114+ '';
115115 description = ''Configure the ping frequency and retention of the rrd files.
116116 Once set, changing the interval will require deletion or migration of all
117117 the collected data.'';
nixos/modules/services/web-apps/matomo-doc.xml+11−11
@@ -21,18 +21,18 @@
2121 passwordless database authentication via the UNIX_SOCKET authentication
2222 plugin with the following SQL commands:
2323<programlisting>
24− # For MariaDB
25− INSTALL PLUGIN unix_socket SONAME 'auth_socket';
26− CREATE DATABASE matomo;
27− CREATE USER 'matomo'@'localhost' IDENTIFIED WITH unix_socket;
28− GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'localhost';
24+# For MariaDB
25+INSTALL PLUGIN unix_socket SONAME 'auth_socket';
26+CREATE DATABASE matomo;
27+CREATE USER 'matomo'@'localhost' IDENTIFIED WITH unix_socket;
28+GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'localhost';
2929
30− # For MySQL
31− INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';
32− CREATE DATABASE matomo;
33− CREATE USER 'matomo'@'localhost' IDENTIFIED WITH auth_socket;
34− GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'localhost';
35− </programlisting>
30+# For MySQL
31+INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';
32+CREATE DATABASE matomo;
33+CREATE USER 'matomo'@'localhost' IDENTIFIED WITH auth_socket;
34+GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'localhost';
35+</programlisting>
3636 Then fill in <literal>matomo</literal> as database user and database name,
3737 and leave the password field blank. This authentication works by allowing
3838 only the <literal>matomo</literal> unix user to authenticate as the
pkgs/development/coq-modules/bignums/default.nix+4
@@ -17,6 +17,10 @@ let params = {
1717 rev = "V8.9.0";
1818 sha256 = "03qz1w2xb2j5p06liz5yyafl0fl9vprcqm6j0iwi7rxwghl00p01";
1919 };
20+ "8.10" = {
21+ rev = "V8.10+beta1";
22+ sha256 = "1slw227idwjw9a21vj3s6kal22mrmvvlpg8r7xk590ml99bn6404";
23+ };
2024 };
2125 param = params."${coq.coq-version}";
2226in
pkgs/development/coq-modules/coqprime/default.nix+1
@@ -13,6 +13,7 @@ let params =
1313 };
1414 "8.8" = v_8_8;
1515 "8.9" = v_8_8;
16+ "8.10" = v_8_8;
1617 };
1718 param = params."${coq.coq-version}"
1819; in
pkgs/development/interpreters/gauche/default.nix+2−2
@@ -4,11 +4,11 @@
44
55stdenv.mkDerivation rec {
66 name = "gauche-${version}";
7− version = "0.9.7";
7+ version = "0.9.8";
88
99 src = fetchurl {
1010 url = "mirror://sourceforge/gauche/Gauche-${version}.tgz";
11− sha256 = "181nycikma0rwrb1h6mi3kys11f8628pq8g5r3fg5hiz5sabscrd";
11+ sha256 = "0jxp1ladpy8kvfvk561c64spf1c3d6giqla6zscqkd6qa480vcry";
1212 };
1313
1414 nativeBuildInputs = [ pkgconfig texinfo ];
pkgs/development/python-modules/micawber/default.nix+2−2
@@ -2,11 +2,11 @@
22
33buildPythonPackage rec {
44 pname = "micawber";
5− version = "0.4.0";
5+ version = "0.4.1";
66
77 src = fetchPypi {
88 inherit pname version;
9− sha256 = "2e19cd5e9ce5b8b57714389e4b709af7dedc4f8f44e9df5566a9d3ccefaac38e";
9+ sha256 = "002g31h4fcrrlfcrcbqa94aggszadm0p91c28n19vgssinmbz0ia";
1010 };
1111
1212 propagatedBuildInputs = [ beautifulsoup4 ];
pkgs/development/python-modules/plotly/default.nix+2−2
@@ -11,11 +11,11 @@
1111
1212buildPythonPackage rec {
1313 pname = "plotly";
14− version = "3.9.0";
14+ version = "3.10.0";
1515
1616 src = fetchPypi {
1717 inherit pname version;
18− sha256 = "498c35a2a482f7c7937fc2f3681fec653a0191dd21e40e754a6b774234cd167e";
18+ sha256 = "164aav7i3ann1lv3xbb76ylpph4hissl0wsnmil1s3m0r7sk7jsx";
1919 };
2020
2121 propagatedBuildInputs = [
pkgs/development/python-modules/poetry/default.nix+2−2
@@ -32,11 +32,11 @@ let
3232
3333in buildPythonPackage rec {
3434 pname = "poetry";
35− version = "0.12.10";
35+ version = "0.12.16";
3636
3737 src = fetchPypi {
3838 inherit pname version;
39− sha256 = "00npb0jlimnk4r01zkhfmns4843j1hfhd388s326da5pd8n0dq7l";
39+ sha256 = "0h4ldchggsh6gli16p1z25c4jj1in3yyzgqf285zidnjc6rlrqc8";
4040 };
4141
4242 postPatch = ''
pkgs/development/tools/build-managers/buck/default.nix+4−4
@@ -2,13 +2,13 @@
22
33stdenv.mkDerivation rec {
44 pname = "buck";
5− version = "2019.05.22.01";
5+ version = "2019.06.17.01";
66
77 src = fetchFromGitHub {
88 owner = "facebook";
99 repo = pname;
1010 rev = "v${version}";
11− sha256 = "1fxprw18kd3cw1lzv4xi1lnbdni06hs4vm9yh0w548rsfn3wnmxq";
11+ sha256 = "1nmphjxqwp51j16qajgvi853dm7654x1w1737xr81zzpcbjw6qig";
1212 };
1313
1414 patches = [ ./pex-mtime.patch ];
@@ -34,9 +34,9 @@ stdenv.mkDerivation rec {
3434 '';
3535
3636 meta = with stdenv.lib; {
37− homepage = https://buckbuild.com/;
37+ homepage = "https://buck.build/";
3838 description = "A high-performance build tool";
39− maintainers = [ maintainers.jgertm ];
39+ maintainers = [ maintainers.jgertm maintainers.marsam ];
4040 license = licenses.asl20;
4141 platforms = platforms.all;
4242 };
pkgs/development/tools/misc/fswatch/default.nix+2−1
@@ -6,6 +6,7 @@
66, libtool
77, makeWrapper
88, texinfo
9+, CoreServices
910}:
1011
1112stdenv.mkDerivation rec {
@@ -19,7 +20,7 @@ stdenv.mkDerivation rec {
1920 sha256 = "1d1fvm36qgh6a5j9v24wai61d297pvzxr14jngjlhh4i474ff21i";
2021 };
2122
22− nativeBuildInputs = [ autoreconfHook ];
23+ nativeBuildInputs = [ autoreconfHook ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
2324 buildInputs = [ gettext libtool makeWrapper texinfo ];
2425
2526 meta = with stdenv.lib; {
pkgs/development/tools/rust/cargo-make/default.nix+5−5
@@ -2,7 +2,7 @@
22
33rustPlatform.buildRustPackage rec {
44 pname = "cargo-make";
5− version = "0.19.5";
5+ version = "0.20.0";
66
77 src =
88 let
@@ -10,11 +10,11 @@ rustPlatform.buildRustPackage rec {
1010 owner = "sagiegurari";
1111 repo = pname;
1212 rev = version;
13− sha256 = "0xjyzsi3n3lb5g4gl6v0s4p87nazkqgjf244m792iji9i568ynjb";
13+ sha256 = "0hf8g91iv4c856whaaqrv5s8z56gi3086pva6vdwmn75gwxkw7zk";
1414 };
1515 cargo-lock = fetchurl {
16− url = "https://gist.githubusercontent.com/xrelkd/e4c9c7738b21f284d97cb7b1d181317d/raw/285cf8f9b0ab33db0d656fdc8e759feed55c0167/cargo-make-Cargo.lock";
17− sha256 = "0l2i2hq43k482m2w6hpapaq53r8bjljfcszp6csljj4fvxcl62yj";
16+ url = "https://gist.githubusercontent.com/xrelkd/e4c9c7738b21f284d97cb7b1d181317d/raw/8b4ca42376199d4e4781473b4112ef8f18bbd1cc/cargo-make-Cargo.lock";
17+ sha256 = "1zffq7r1cnzdqw4d3vdvlwj56pfak9gj14ibn1g0j7lncwxw2dgs";
1818 };
1919 in
2020 runCommand "cargo-make-src" {} ''
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
2525
2626 buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
2727
28− cargoSha256 = "1rmdmvr5wc2m0yv3dy07cv9y1xrwlfri3hk97zjwv5f73wgncspy";
28+ cargoSha256 = "1r2fiwcjf739rkprrwidgsd9i5pjgk723ipazmlccz2jpwbrk7zr";
2929
3030 # Some tests fail because they need network access.
3131 # However, Travis ensures a proper build.
pkgs/top-level/all-packages.nix+3−1
@@ -9188,7 +9188,9 @@ in
91889188
91899189 fsatrace = callPackage ../development/tools/misc/fsatrace { };
91909190
9191− fswatch = callPackage ../development/tools/misc/fswatch { };
9191+ fswatch = callPackage ../development/tools/misc/fswatch {
9192+ inherit (darwin.apple_sdk.frameworks) CoreServices;
9193+ };
91929194
91939195 funnelweb = callPackage ../development/tools/literate-programming/funnelweb { };
91949196