diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2018-11-29 08:12:56 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2018-11-29 08:12:56 +0100 |
commit | 9db2421d1f65beb38911e8133349193db0042a1d (patch) | |
tree | 90a2f4a56cf871c74aad86138d85e9631c2c2f86 /nixos/doc | |
parent | 9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90 (diff) | |
parent | 8d88e4f6c7b09fe811d92b346e5eafefe07a47c9 (diff) | |
download | nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.gz nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.bz2 nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.lz nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.xz nixlib-9db2421d1f65beb38911e8133349193db0042a1d.tar.zst nixlib-9db2421d1f65beb38911e8133349193db0042a1d.zip |
Merge master into staging-next
Diffstat (limited to 'nixos/doc')
4 files changed, 31 insertions, 2 deletions
diff --git a/nixos/doc/manual/configuration/modularity.xml b/nixos/doc/manual/configuration/modularity.xml index 298ffd661f67..cda36eba25c1 100644 --- a/nixos/doc/manual/configuration/modularity.xml +++ b/nixos/doc/manual/configuration/modularity.xml @@ -127,4 +127,23 @@ nix-repl> map (x: x.hostName) config.<xref linkend="opt-services.httpd.virtualHo [ "example.org" "example.gov" ] </screen> </para> + + <para> + While abstracting your configuration, you may find it useful to generate + modules using code, instead of writing files. The example + below would have the same effect as importing a file which sets those + options. + <screen> + { config, pkgs, ... }: + + let netConfig = { hostName }: { + networking.hostName = hostName; + networking.useDHCP = false; + }; + + in + + { imports = [ (netConfig "nixos.localdomain") ]; } + </screen> +</para> </section> diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.xml b/nixos/doc/manual/development/running-nixos-tests-interactively.xml index b25d3dcb9116..c15ad448317f 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.xml +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.xml @@ -19,7 +19,7 @@ starting VDE switch for network 1 > startAll > testScript > $machine->succeed("touch /tmp/foo") -> print($machine->succeed("pwd"), "\n") # Show stdout of command +> print($machine->succeed("pwd")) # Show stdout of command </screen> The function <command>testScript</command> executes the entire test script and drops you back into the test driver command line upon its completion. diff --git a/nixos/doc/manual/development/writing-nixos-tests.xml b/nixos/doc/manual/development/writing-nixos-tests.xml index 983f8f9cbe3e..4a2615c9407b 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.xml +++ b/nixos/doc/manual/development/writing-nixos-tests.xml @@ -108,7 +108,7 @@ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualis <programlisting> $machine->start; $machine->waitForUnit("default.target"); -die unless $machine->succeed("uname") =~ /Linux/; +$machine->succeed("uname") =~ /Linux/ or die; </programlisting> The first line is actually unnecessary; machines are implicitly started when you first execute an action on them (such as <literal>waitForUnit</literal> diff --git a/nixos/doc/manual/release-notes/rl-1903.xml b/nixos/doc/manual/release-notes/rl-1903.xml index 49f475913d8a..cedd5fc21c6d 100644 --- a/nixos/doc/manual/release-notes/rl-1903.xml +++ b/nixos/doc/manual/release-notes/rl-1903.xml @@ -113,6 +113,16 @@ </listitem> <listitem> <para> + The <literal>ntp</literal> module now has sane default restrictions. + If you're relying on the previous defaults, which permitted all queries + and commands from all firewall-permitted sources, you can set + <varname>services.ntp.restrictDefault</varname> and + <varname>services.ntp.restrictSource</varname> to + <literal>[]</literal>. + </para> + </listitem> + <listitem> + <para> Package <varname>rabbitmq_server</varname> is renamed to <varname>rabbitmq-server</varname>. </para> |