mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
nixos/manual: inline the single footnote
this is a lot easier than adding footnote support for just the one instance. if a use case for footnotes appears in the future (e.g. if we wanted to render the nixpkgs manual with nixos-render-docs as well) this decision should be reevaluated.
This commit is contained in:
parent
2ad93ab199
commit
65d749c80b
@ -67,7 +67,13 @@ When using multiple modules, you may need to access configuration values
|
||||
defined in other modules. This is what the `config` function argument is
|
||||
for: it contains the complete, merged system configuration. That is,
|
||||
`config` is the result of combining the configurations returned by every
|
||||
module [^1] . For example, here is a module that adds some packages to
|
||||
module. (If you're wondering how it's possible that the (indirect) *result*
|
||||
of a function is passed as an *input* to that same function: that's
|
||||
because Nix is a "lazy" language --- it only computes values when
|
||||
they are needed. This works as long as no individual configuration
|
||||
value depends on itself.)
|
||||
|
||||
For example, here is a module that adds some packages to
|
||||
[](#opt-environment.systemPackages) only if
|
||||
[](#opt-services.xserver.enable) is set to `true` somewhere else:
|
||||
|
||||
@ -125,9 +131,3 @@ in
|
||||
|
||||
{ imports = [ (netConfig "nixos.localdomain") ]; }
|
||||
```
|
||||
|
||||
[^1]: If you're wondering how it's possible that the (indirect) *result*
|
||||
of a function is passed as an *input* to that same function: that's
|
||||
because Nix is a "lazy" language --- it only computes values when
|
||||
they are needed. This works as long as no individual configuration
|
||||
value depends on itself.
|
||||
|
@ -79,17 +79,16 @@ services.httpd.adminAddr = pkgs.lib.mkForce "bob@example.org";
|
||||
<literal>config</literal> function argument is for: it contains the
|
||||
complete, merged system configuration. That is,
|
||||
<literal>config</literal> is the result of combining the
|
||||
configurations returned by every module <footnote>
|
||||
<para>
|
||||
If you’re wondering how it’s possible that the (indirect)
|
||||
<emphasis>result</emphasis> of a function is passed as an
|
||||
<emphasis>input</emphasis> to that same function: that’s because
|
||||
Nix is a <quote>lazy</quote> language — it only computes values
|
||||
when they are needed. This works as long as no individual
|
||||
configuration value depends on itself.
|
||||
</para>
|
||||
</footnote> . For example, here is a module that adds some packages
|
||||
to <xref linkend="opt-environment.systemPackages" /> only if
|
||||
configurations returned by every module. (If you’re wondering how
|
||||
it’s possible that the (indirect) <emphasis>result</emphasis> of a
|
||||
function is passed as an <emphasis>input</emphasis> to that same
|
||||
function: that’s because Nix is a <quote>lazy</quote> language — it
|
||||
only computes values when they are needed. This works as long as no
|
||||
individual configuration value depends on itself.)
|
||||
</para>
|
||||
<para>
|
||||
For example, here is a module that adds some packages to
|
||||
<xref linkend="opt-environment.systemPackages" /> only if
|
||||
<xref linkend="opt-services.xserver.enable" /> is set to
|
||||
<literal>true</literal> somewhere else:
|
||||
</para>
|
||||
|
Loading…
Reference in New Issue
Block a user