Merge pull request #207150 from ncfavier/doc-minor

This commit is contained in:
Naïm Favier 2022-12-27 17:35:41 +01:00 committed by GitHub
commit 23d58dae80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
110 changed files with 774 additions and 760 deletions

View File

@ -34,4 +34,4 @@ buildContainer {
- `mounts` specifies additional mount points chosen by the user. By default only a minimal set of necessary filesystems are mounted into the container (e.g procfs, cgroupfs) - `mounts` specifies additional mount points chosen by the user. By default only a minimal set of necessary filesystems are mounted into the container (e.g procfs, cgroupfs)
- `readonly` makes the container\'s rootfs read-only if it is set to true. The default value is false `false`. - `readonly` makes the container's rootfs read-only if it is set to true. The default value is false `false`.

View File

@ -4,7 +4,7 @@
## Compiling without AVX support {#compiling-without-avx-support} ## Compiling without AVX support {#compiling-without-avx-support}
Especially older CPUs don\'t support [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) (Advanced Vector Extensions) instructions that are used by DLib to optimize their algorithms. Especially older CPUs don't support [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) (Advanced Vector Extensions) instructions that are used by DLib to optimize their algorithms.
On the affected hardware errors like `Illegal instruction` will occur. In those cases AVX support needs to be disabled: On the affected hardware errors like `Illegal instruction` will occur. In those cases AVX support needs to be disabled:

View File

@ -199,7 +199,7 @@ Its important to test any executables generated by a build when you change or
### Meets Nixpkgs contribution standards {#submitting-changes-contribution-standards} ### Meets Nixpkgs contribution standards {#submitting-changes-contribution-standards}
The last checkbox is fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md). The contributing document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc\... Everyone should read and understand the standards the community has for contributing before submitting a pull request. The last checkbox is fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md). The contributing document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc... Everyone should read and understand the standards the community has for contributing before submitting a pull request.
## Hotfixing pull requests {#submitting-changes-hotfixing-pull-requests} ## Hotfixing pull requests {#submitting-changes-hotfixing-pull-requests}

View File

@ -4,7 +4,7 @@
## Usage {#sec-pkgs-nix-gitignore-usage} ## Usage {#sec-pkgs-nix-gitignore-usage}
`pkgs.nix-gitignore` exports a number of functions, but you\'ll most likely need either `gitignoreSource` or `gitignoreSourcePure`. As their first argument, they both accept either 1. a file with gitignore lines or 2. a string with gitignore lines, or 3. a list of either of the two. They will be concatenated into a single big string. `pkgs.nix-gitignore` exports a number of functions, but you'll most likely need either `gitignoreSource` or `gitignoreSourcePure`. As their first argument, they both accept either 1. a file with gitignore lines or 2. a string with gitignore lines, or 3. a list of either of the two. They will be concatenated into a single big string.
```nix ```nix
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
@ -30,7 +30,7 @@ gitignoreSourcePure = gitignoreFilterSourcePure (_: _: true);
gitignoreSource = gitignoreFilterSource (_: _: true); gitignoreSource = gitignoreFilterSource (_: _: true);
``` ```
Those filter functions accept the same arguments the `builtins.filterSource` function would pass to its filters, thus `fn: gitignoreFilterSourcePure fn ""` should be extensionally equivalent to `filterSource`. The file is blacklisted if it\'s blacklisted by either your filter or the gitignoreFilter. Those filter functions accept the same arguments the `builtins.filterSource` function would pass to its filters, thus `fn: gitignoreFilterSourcePure fn ""` should be extensionally equivalent to `filterSource`. The file is blacklisted if it's blacklisted by either your filter or the gitignoreFilter.
If you want to make your own filter from scratch, you may use If you want to make your own filter from scratch, you may use

View File

@ -73,7 +73,7 @@ There are also two ways to try compiling a package which has been marked as unsu
} }
``` ```
The difference between a package being unsupported on some system and being broken is admittedly a bit fuzzy. If a program *ought* to work on a certain platform, but doesn't, the platform should be included in `meta.platforms`, but marked as broken with e.g. `meta.broken = !hostPlatform.isWindows`. Of course, this begs the question of what \"ought\" means exactly. That is left to the package maintainer. The difference between a package being unsupported on some system and being broken is admittedly a bit fuzzy. If a program *ought* to work on a certain platform, but doesn't, the platform should be included in `meta.platforms`, but marked as broken with e.g. `meta.broken = !hostPlatform.isWindows`. Of course, this begs the question of what "ought" means exactly. That is left to the package maintainer.
## Installing unfree packages {#sec-allow-unfree} ## Installing unfree packages {#sec-allow-unfree}

View File

@ -75,7 +75,7 @@ necessary).
Packages in Nixpkgs sometimes provide systemd units with them, usually Packages in Nixpkgs sometimes provide systemd units with them, usually
in e.g `#pkg-out#/lib/systemd/`. Putting such a package in in e.g `#pkg-out#/lib/systemd/`. Putting such a package in
`environment.systemPackages` doesn\'t make the service available to `environment.systemPackages` doesn't make the service available to
users or the system. users or the system.
In order to enable a systemd *system* service with provided upstream In order to enable a systemd *system* service with provided upstream
@ -87,9 +87,9 @@ systemd.packages = [ pkgs.packagekit ];
Usually NixOS modules written by the community do the above, plus take Usually NixOS modules written by the community do the above, plus take
care of other details. If a module was written for a service you are care of other details. If a module was written for a service you are
interested in, you\'d probably need only to use interested in, you'd probably need only to use
`services.#name#.enable = true;`. These services are defined in `services.#name#.enable = true;`. These services are defined in
Nixpkgs\' [ `nixos/modules/` directory Nixpkgs' [ `nixos/modules/` directory
](https://github.com/NixOS/nixpkgs/tree/master/nixos/modules). In case ](https://github.com/NixOS/nixpkgs/tree/master/nixos/modules). In case
the service is simple enough, the above method should work, and start the service is simple enough, the above method should work, and start
the service on boot. the service on boot.
@ -98,8 +98,8 @@ the service on boot.
differently. Given a package that has a systemd unit file at differently. Given a package that has a systemd unit file at
`#pkg-out#/lib/systemd/user/`, using [](#opt-systemd.packages) will `#pkg-out#/lib/systemd/user/`, using [](#opt-systemd.packages) will
make you able to start the service via `systemctl --user start`, but it make you able to start the service via `systemctl --user start`, but it
won\'t start automatically on login. However, You can imperatively won't start automatically on login. However, You can imperatively
enable it by adding the package\'s attribute to enable it by adding the package's attribute to
[](#opt-systemd.packages) and then do this (e.g): [](#opt-systemd.packages) and then do this (e.g):
```ShellSession ```ShellSession
@ -113,7 +113,7 @@ If you are interested in a timer file, use `timers.target.wants` instead
of `default.target.wants` in the 1st and 2nd command. of `default.target.wants` in the 1st and 2nd command.
Using `systemctl --user enable syncthing.service` instead of the above, Using `systemctl --user enable syncthing.service` instead of the above,
will work, but it\'ll use the absolute path of `syncthing.service` for will work, but it'll use the absolute path of `syncthing.service` for
the symlink, and this path is in `/nix/store/.../lib/systemd/user/`. the symlink, and this path is in `/nix/store/.../lib/systemd/user/`.
Hence [garbage collection](#sec-nix-gc) will remove that file and you Hence [garbage collection](#sec-nix-gc) will remove that file and you
will wind up with a broken symlink in your systemd configuration, which will wind up with a broken symlink in your systemd configuration, which

View File

@ -17,7 +17,7 @@ services.kubernetes = {
}; };
``` ```
Another way is to assign cluster roles (\"master\" and/or \"node\") to Another way is to assign cluster roles ("master" and/or "node") to
the host. This enables apiserver, controllerManager, scheduler, the host. This enables apiserver, controllerManager, scheduler,
addonManager, kube-proxy and etcd: addonManager, kube-proxy and etcd:

View File

@ -2,7 +2,7 @@
In some cases, it may be desirable to take advantage of commonly-used, In some cases, it may be desirable to take advantage of commonly-used,
predefined configurations provided by nixpkgs, but different from those predefined configurations provided by nixpkgs, but different from those
that come as default. This is a role fulfilled by NixOS\'s Profiles, that come as default. This is a role fulfilled by NixOS's Profiles,
which come as files living in `<nixpkgs/nixos/modules/profiles>`. That which come as files living in `<nixpkgs/nixos/modules/profiles>`. That
is to say, expected usage is to add them to the imports list of your is to say, expected usage is to add them to the imports list of your
`/etc/configuration.nix` as such: `/etc/configuration.nix` as such:

View File

@ -30,7 +30,7 @@ to your NixOS configuration. For instance, if you remove a user from
[](#opt-users.users) and run nixos-rebuild, the user [](#opt-users.users) and run nixos-rebuild, the user
account will cease to exist. Also, imperative commands for managing users and account will cease to exist. Also, imperative commands for managing users and
groups, such as useradd, are no longer available. Passwords may still be groups, such as useradd, are no longer available. Passwords may still be
assigned by setting the user\'s assigned by setting the user's
[hashedPassword](#opt-users.users._name_.hashedPassword) option. A [hashedPassword](#opt-users.users._name_.hashedPassword) option. A
hashed password can be generated using `mkpasswd`. hashed password can be generated using `mkpasswd`.

View File

@ -4,7 +4,7 @@ While X11 (see [](#sec-x11)) is still the primary display technology
on NixOS, Wayland support is steadily improving. Where X11 separates the on NixOS, Wayland support is steadily improving. Where X11 separates the
X Server and the window manager, on Wayland those are combined: a X Server and the window manager, on Wayland those are combined: a
Wayland Compositor is like an X11 window manager, but also embeds the Wayland Compositor is like an X11 window manager, but also embeds the
Wayland \'Server\' functionality. This means it is sufficient to install Wayland 'Server' functionality. This means it is sufficient to install
a Wayland Compositor such as sway without separately enabling a Wayland a Wayland Compositor such as sway without separately enabling a Wayland
server: server:

View File

@ -81,7 +81,7 @@ second password to login can be redundant.
To enable auto-login, you need to define your default window manager and To enable auto-login, you need to define your default window manager and
desktop environment. If you wanted no desktop environment and i3 as your desktop environment. If you wanted no desktop environment and i3 as your
your window manager, you\'d define: your window manager, you'd define:
```nix ```nix
services.xserver.displayManager.defaultSession = "none+i3"; services.xserver.displayManager.defaultSession = "none+i3";
@ -110,7 +110,7 @@ maintained but may perform worse in some cases (like in old chipsets).
The second driver, `intel`, is specific to Intel GPUs, but not The second driver, `intel`, is specific to Intel GPUs, but not
recommended by most distributions: it lacks several modern features (for recommended by most distributions: it lacks several modern features (for
example, it doesn\'t support Glamor) and the package hasn\'t been example, it doesn't support Glamor) and the package hasn't been
officially updated since 2015. officially updated since 2015.
The results vary depending on the hardware, so you may have to try both The results vary depending on the hardware, so you may have to try both
@ -162,7 +162,7 @@ with other kernel modules.
AMD provides a proprietary driver for its graphics cards that is not AMD provides a proprietary driver for its graphics cards that is not
enabled by default because it's not Free Software, is often broken in enabled by default because it's not Free Software, is often broken in
nixpkgs and as of this writing doesn\'t offer more features or nixpkgs and as of this writing doesn't offer more features or
performance. If you still want to use it anyway, you need to explicitly performance. If you still want to use it anyway, you need to explicitly
set: set:
@ -215,7 +215,7 @@ US layout, with an additional layer to type some greek symbols by
pressing the right-alt key. pressing the right-alt key.
Create a file called `us-greek` with the following content (under a Create a file called `us-greek` with the following content (under a
directory called `symbols`; it\'s an XKB peculiarity that will help with directory called `symbols`; it's an XKB peculiarity that will help with
testing): testing):
```nix ```nix
@ -249,7 +249,7 @@ The name (after `extraLayouts.`) should match the one given to the
Applying this customization requires rebuilding several packages, and a Applying this customization requires rebuilding several packages, and a
broken XKB file can lead to the X session crashing at login. Therefore, broken XKB file can lead to the X session crashing at login. Therefore,
you\'re strongly advised to **test your layout before applying it**: you're strongly advised to **test your layout before applying it**:
```ShellSession ```ShellSession
$ nix-shell -p xorg.xkbcomp $ nix-shell -p xorg.xkbcomp
@ -313,8 +313,8 @@ prefer to keep the layout definitions inside the NixOS configuration.
Unfortunately, the Xorg server does not (currently) support setting a Unfortunately, the Xorg server does not (currently) support setting a
keymap directly but relies instead on XKB rules to select the matching keymap directly but relies instead on XKB rules to select the matching
components (keycodes, types, \...) of a layout. This means that components (keycodes, types, ...) of a layout. This means that
components other than symbols won\'t be loaded by default. As a components other than symbols won't be loaded by default. As a
workaround, you can set the keymap using `setxkbmap` at the start of the workaround, you can set the keymap using `setxkbmap` at the start of the
session with: session with:
@ -323,7 +323,7 @@ services.xserver.displayManager.sessionCommands = "setxkbmap -keycodes media";
``` ```
If you are manually starting the X server, you should set the argument If you are manually starting the X server, you should set the argument
`-xkbdir /etc/X11/xkb`, otherwise X won\'t find your layout files. For `-xkbdir /etc/X11/xkb`, otherwise X won't find your layout files. For
example with `xinit` run example with `xinit` run
```ShellSession ```ShellSession

View File

@ -31,8 +31,8 @@ enabled. To enable Thunar without enabling Xfce, use the configuration
option [](#opt-programs.thunar.enable) instead of simply adding option [](#opt-programs.thunar.enable) instead of simply adding
`pkgs.xfce.thunar` to [](#opt-environment.systemPackages). `pkgs.xfce.thunar` to [](#opt-environment.systemPackages).
If you\'d like to add extra plugins to Thunar, add them to If you'd like to add extra plugins to Thunar, add them to
[](#opt-programs.thunar.plugins). You shouldn\'t just add them to [](#opt-programs.thunar.plugins). You shouldn't just add them to
[](#opt-environment.systemPackages). [](#opt-environment.systemPackages).
## Troubleshooting {#sec-xfce-troubleshooting .unnumbered} ## Troubleshooting {#sec-xfce-troubleshooting .unnumbered}
@ -46,7 +46,7 @@ Thunar:2410): GVFS-RemoteVolumeMonitor-WARNING **: remote volume monitor with db
``` ```
This is caused by some needed GNOME services not running. This is all This is caused by some needed GNOME services not running. This is all
fixed by enabling \"Launch GNOME services on startup\" in the Advanced fixed by enabling "Launch GNOME services on startup" in the Advanced
tab of the Session and Startup settings panel. Alternatively, you can tab of the Session and Startup settings panel. Alternatively, you can
run this command to do the same thing. run this command to do the same thing.

View File

@ -149,7 +149,7 @@ multiple modules, or as an alternative to related `enable` options.
As an example, we will take the case of display managers. There is a As an example, we will take the case of display managers. There is a
central display manager module for generic display manager options and a central display manager module for generic display manager options and a
module file per display manager backend (sddm, gdm \...). module file per display manager backend (sddm, gdm ...).
There are two approaches we could take with this module structure: There are two approaches we could take with this module structure:

View File

@ -92,11 +92,11 @@ merging is handled.
: A free-form attribute set. : A free-form attribute set.
::: {.warning} ::: {.warning}
This type will be deprecated in the future because it doesn\'t This type will be deprecated in the future because it doesn't
recurse into attribute sets, silently drops earlier attribute recurse into attribute sets, silently drops earlier attribute
definitions, and doesn\'t discharge `lib.mkDefault`, `lib.mkIf` definitions, and doesn't discharge `lib.mkDefault`, `lib.mkIf`
and co. For allowing arbitrary attribute sets, prefer and co. For allowing arbitrary attribute sets, prefer
`types.attrsOf types.anything` instead which doesn\'t have these `types.attrsOf types.anything` instead which doesn't have these
problems. problems.
::: :::
@ -222,7 +222,7 @@ Submodules are detailed in [Submodule](#section-option-types-submodule).
- *`specialArgs`* An attribute set of extra arguments to be passed - *`specialArgs`* An attribute set of extra arguments to be passed
to the module functions. The option `_module.args` should be to the module functions. The option `_module.args` should be
used instead for most arguments since it allows overriding. used instead for most arguments since it allows overriding.
*`specialArgs`* should only be used for arguments that can\'t go *`specialArgs`* should only be used for arguments that can't go
through the module fixed-point, because of infinite recursion or through the module fixed-point, because of infinite recursion or
other problems. An example is overriding the `lib` argument, other problems. An example is overriding the `lib` argument,
because `lib` itself is used to define `_module.args`, which because `lib` itself is used to define `_module.args`, which
@ -236,7 +236,7 @@ Submodules are detailed in [Submodule](#section-option-types-submodule).
In such a case it would allow the option to be set with In such a case it would allow the option to be set with
`the-submodule.config = "value"` instead of requiring `the-submodule.config = "value"` instead of requiring
`the-submodule.config.config = "value"`. This is because `the-submodule.config.config = "value"`. This is because
only when modules *don\'t* set the `config` or `options` only when modules *don't* set the `config` or `options`
keys, all keys are interpreted as option definitions in the keys, all keys are interpreted as option definitions in the
`config` section. Enabling this option implicitly puts all `config` section. Enabling this option implicitly puts all
attributes in the `config` section. attributes in the `config` section.
@ -324,7 +324,7 @@ Composed types are types that take a type as parameter. `listOf
: Type *`t1`* or type *`t2`*, e.g. `with types; either int str`. : Type *`t1`* or type *`t2`*, e.g. `with types; either int str`.
Multiple definitions cannot be merged. Multiple definitions cannot be merged.
`types.oneOf` \[ *`t1 t2`* \... \] `types.oneOf` \[ *`t1 t2`* ... \]
: Type *`t1`* or type *`t2`* and so forth, e.g. : Type *`t1`* or type *`t2`* and so forth, e.g.
`with types; oneOf [ int str bool ]`. Multiple definitions cannot be `with types; oneOf [ int str bool ]`. Multiple definitions cannot be

View File

@ -2,7 +2,7 @@
Modules that are imported can also be disabled. The option declarations, Modules that are imported can also be disabled. The option declarations,
config implementation and the imports of a disabled module will be config implementation and the imports of a disabled module will be
ignored, allowing another to take it\'s place. This can be used to ignored, allowing another to take its place. This can be used to
import a set of modules from another channel while keeping the rest of import a set of modules from another channel while keeping the rest of
the system on a stable release. the system on a stable release.
@ -14,7 +14,7 @@ relative to the modules path (eg. \<nixpkgs/nixos/modules> for nixos).
This example will replace the existing postgresql module with the This example will replace the existing postgresql module with the
version defined in the nixos-unstable channel while keeping the rest of version defined in the nixos-unstable channel while keeping the rest of
the modules and packages from the original nixos channel. This only the modules and packages from the original nixos channel. This only
overrides the module definition, this won\'t use postgresql from overrides the module definition, this won't use postgresql from
nixos-unstable unless explicitly configured to do so. nixos-unstable unless explicitly configured to do so.
```nix ```nix
@ -35,7 +35,7 @@ nixos-unstable unless explicitly configured to do so.
This example shows how to define a custom module as a replacement for an This example shows how to define a custom module as a replacement for an
existing module. Importing this module will disable the original module existing module. Importing this module will disable the original module
without having to know it\'s implementation details. without having to know its implementation details.
```nix ```nix
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:

View File

@ -9,10 +9,10 @@ can be declared. File formats can be separated into two categories:
`{ foo = { bar = 10; }; }`. Other examples are INI, YAML and TOML. `{ foo = { bar = 10; }; }`. Other examples are INI, YAML and TOML.
The following section explains the convention for these settings. The following section explains the convention for these settings.
- Non-nix-representable ones: These can\'t be trivially mapped to a - Non-nix-representable ones: These can't be trivially mapped to a
subset of Nix syntax. Most generic programming languages are in this subset of Nix syntax. Most generic programming languages are in this
group, e.g. bash, since the statement `if true; then echo hi; fi` group, e.g. bash, since the statement `if true; then echo hi; fi`
doesn\'t have a trivial representation in Nix. doesn't have a trivial representation in Nix.
Currently there are no fixed conventions for these, but it is common Currently there are no fixed conventions for these, but it is common
to have a `configFile` option for setting the configuration file to have a `configFile` option for setting the configuration file
@ -24,7 +24,7 @@ can be declared. File formats can be separated into two categories:
an `extraConfig` option of type `lines` to allow arbitrary text an `extraConfig` option of type `lines` to allow arbitrary text
after the autogenerated part of the file. after the autogenerated part of the file.
## Nix-representable Formats (JSON, YAML, TOML, INI, \...) {#sec-settings-nix-representable} ## Nix-representable Formats (JSON, YAML, TOML, INI, ...) {#sec-settings-nix-representable}
By convention, formats like this are handled with a generic `settings` By convention, formats like this are handled with a generic `settings`
option, representing the full program configuration as a Nix value. The option, representing the full program configuration as a Nix value. The

View File

@ -19,7 +19,7 @@ $ nix-shell
nix-shell$ make nix-shell$ make
``` ```
Once you are done making modifications to the manual, it\'s important to Once you are done making modifications to the manual, it's important to
build it before committing. You can do that as follows: build it before committing. You can do that as follows:
```ShellSession ```ShellSession

View File

@ -71,7 +71,7 @@ The meaning of each part is as follows.
- This `imports` list enumerates the paths to other NixOS modules that - This `imports` list enumerates the paths to other NixOS modules that
should be included in the evaluation of the system configuration. A should be included in the evaluation of the system configuration. A
default set of modules is defined in the file `modules/module-list.nix`. default set of modules is defined in the file `modules/module-list.nix`.
These don\'t need to be added in the import list. These don't need to be added in the import list.
- The attribute `options` is a nested set of *option declarations* - The attribute `options` is a nested set of *option declarations*
(described below). (described below).

View File

@ -165,7 +165,7 @@ The following methods are available on machine objects:
`get_screen_text_variants` `get_screen_text_variants`
: Return a list of different interpretations of what is currently : Return a list of different interpretations of what is currently
visible on the machine\'s screen using optical character visible on the machine's screen using optical character
recognition. The number and order of the interpretations is not recognition. The number and order of the interpretations is not
specified and is subject to change, but if no exception is raised at specified and is subject to change, but if no exception is raised at
least one will be returned. least one will be returned.
@ -177,7 +177,7 @@ The following methods are available on machine objects:
`get_screen_text` `get_screen_text`
: Return a textual representation of what is currently visible on the : Return a textual representation of what is currently visible on the
machine\'s screen using optical character recognition. machine's screen using optical character recognition.
::: {.note} ::: {.note}
This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`. This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`.
@ -350,8 +350,8 @@ machine.wait_for_unit("xautolock.service", "x-session-user")
This applies to `systemctl`, `get_unit_info`, `wait_for_unit`, This applies to `systemctl`, `get_unit_info`, `wait_for_unit`,
`start_job` and `stop_job`. `start_job` and `stop_job`.
For faster dev cycles it\'s also possible to disable the code-linters For faster dev cycles it's also possible to disable the code-linters
(this shouldn\'t be committed though): (this shouldn't be committed though):
```nix ```nix
{ {
@ -370,7 +370,7 @@ For faster dev cycles it\'s also possible to disable the code-linters
This will produce a Nix warning at evaluation time. To fully disable the This will produce a Nix warning at evaluation time. To fully disable the
linter, wrap the test script in comment directives to disable the Black linter, wrap the test script in comment directives to disable the Black
linter directly (again, don\'t commit this within the Nixpkgs linter directly (again, don't commit this within the Nixpkgs
repository): repository):
```nix ```nix

View File

@ -23,7 +23,7 @@ $ nix-collect-garbage
this unit automatically at certain points in time, for instance, this unit automatically at certain points in time, for instance,
every night at 03:15: every night at 03:15:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
nix.gc.automatic = true; nix.gc.automatic = true;
nix.gc.dates = &quot;03:15&quot;; nix.gc.dates = &quot;03:15&quot;;
</programlisting> </programlisting>

View File

@ -31,7 +31,7 @@ $ ping -c1 10.233.4.2
address. This can be accomplished using the following configuration address. This can be accomplished using the following configuration
on the host: on the host:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.nat.enable = true; networking.nat.enable = true;
networking.nat.internalInterfaces = [&quot;ve-+&quot;]; networking.nat.internalInterfaces = [&quot;ve-+&quot;];
networking.nat.externalInterface = &quot;eth0&quot;; networking.nat.externalInterface = &quot;eth0&quot;;
@ -45,7 +45,7 @@ networking.nat.externalInterface = &quot;eth0&quot;;
If you are using Network Manager, you need to explicitly prevent it If you are using Network Manager, you need to explicitly prevent it
from managing container interfaces: from managing container interfaces:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.networkmanager.unmanaged = [ &quot;interface-name:ve-*&quot; ]; networking.networkmanager.unmanaged = [ &quot;interface-name:ve-*&quot; ];
</programlisting> </programlisting>
<para> <para>

View File

@ -42,7 +42,7 @@ $ systemd-cgls
process would get 1/1001 of the cgroups CPU time.) You can limit a process would get 1/1001 of the cgroups CPU time.) You can limit a
services CPU share in <literal>configuration.nix</literal>: services CPU share in <literal>configuration.nix</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
systemd.services.httpd.serviceConfig.CPUShares = 512; systemd.services.httpd.serviceConfig.CPUShares = 512;
</programlisting> </programlisting>
<para> <para>
@ -57,7 +57,7 @@ systemd.services.httpd.serviceConfig.CPUShares = 512;
<literal>configuration.nix</literal>; for instance, to limit <literal>configuration.nix</literal>; for instance, to limit
<literal>httpd.service</literal> to 512 MiB of RAM (excluding swap): <literal>httpd.service</literal> to 512 MiB of RAM (excluding swap):
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
systemd.services.httpd.serviceConfig.MemoryLimit = &quot;512M&quot;; systemd.services.httpd.serviceConfig.MemoryLimit = &quot;512M&quot;;
</programlisting> </programlisting>
<para> <para>

View File

@ -6,7 +6,7 @@
following specifies that there shall be a container named following specifies that there shall be a container named
<literal>database</literal> running PostgreSQL: <literal>database</literal> running PostgreSQL:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
containers.database = containers.database =
{ config = { config =
{ config, pkgs, ... }: { config, pkgs, ... }:
@ -29,7 +29,7 @@ containers.database =
However, they cannot change the network configuration. You can give However, they cannot change the network configuration. You can give
a container its own network as follows: a container its own network as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
containers.database = { containers.database = {
privateNetwork = true; privateNetwork = true;
hostAddress = &quot;192.168.100.10&quot;; hostAddress = &quot;192.168.100.10&quot;;

View File

@ -85,21 +85,21 @@ Jan 07 15:55:57 hagbard systemd[1]: Started PostgreSQL Server.
Packages in Nixpkgs sometimes provide systemd units with them, Packages in Nixpkgs sometimes provide systemd units with them,
usually in e.g <literal>#pkg-out#/lib/systemd/</literal>. Putting usually in e.g <literal>#pkg-out#/lib/systemd/</literal>. Putting
such a package in <literal>environment.systemPackages</literal> such a package in <literal>environment.systemPackages</literal>
doesn't make the service available to users or the system. doesnt make the service available to users or the system.
</para> </para>
<para> <para>
In order to enable a systemd <emphasis>system</emphasis> service In order to enable a systemd <emphasis>system</emphasis> service
with provided upstream package, use (e.g): with provided upstream package, use (e.g):
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
systemd.packages = [ pkgs.packagekit ]; systemd.packages = [ pkgs.packagekit ];
</programlisting> </programlisting>
<para> <para>
Usually NixOS modules written by the community do the above, plus Usually NixOS modules written by the community do the above, plus
take care of other details. If a module was written for a service take care of other details. If a module was written for a service
you are interested in, you'd probably need only to use you are interested in, youd probably need only to use
<literal>services.#name#.enable = true;</literal>. These services <literal>services.#name#.enable = true;</literal>. These services
are defined in Nixpkgs' are defined in Nixpkgs
<link xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/modules"> <link xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/modules">
<literal>nixos/modules/</literal> directory </link>. In case the <literal>nixos/modules/</literal> directory </link>. In case the
service is simple enough, the above method should work, and start service is simple enough, the above method should work, and start
@ -111,8 +111,8 @@ systemd.packages = [ pkgs.packagekit ];
unit file at <literal>#pkg-out#/lib/systemd/user/</literal>, using unit file at <literal>#pkg-out#/lib/systemd/user/</literal>, using
<xref linkend="opt-systemd.packages" /> will make you able to <xref linkend="opt-systemd.packages" /> will make you able to
start the service via <literal>systemctl --user start</literal>, start the service via <literal>systemctl --user start</literal>,
but it won't start automatically on login. However, You can but it wont start automatically on login. However, You can
imperatively enable it by adding the package's attribute to imperatively enable it by adding the packages attribute to
<xref linkend="opt-systemd.packages" /> and then do this (e.g): <xref linkend="opt-systemd.packages" /> and then do this (e.g):
</para> </para>
<programlisting> <programlisting>
@ -129,7 +129,7 @@ $ systemctl --user enable syncthing.service
</para> </para>
<para> <para>
Using <literal>systemctl --user enable syncthing.service</literal> Using <literal>systemctl --user enable syncthing.service</literal>
instead of the above, will work, but it'll use the absolute path instead of the above, will work, but itll use the absolute path
of <literal>syncthing.service</literal> for the symlink, and this of <literal>syncthing.service</literal> for the symlink, and this
path is in <literal>/nix/store/.../lib/systemd/user/</literal>. path is in <literal>/nix/store/.../lib/systemd/user/</literal>.
Hence <link linkend="sec-nix-gc">garbage collection</link> will Hence <link linkend="sec-nix-gc">garbage collection</link> will

View File

@ -4,7 +4,7 @@
If you find yourself repeating yourself over and over, its time to If you find yourself repeating yourself over and over, its time to
abstract. Take, for instance, this Apache HTTP Server configuration: abstract. Take, for instance, this Apache HTTP Server configuration:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.httpd.virtualHosts = services.httpd.virtualHosts =
{ &quot;blog.example.org&quot; = { { &quot;blog.example.org&quot; = {
@ -29,7 +29,7 @@
the only difference is the document root directories. To prevent the only difference is the document root directories. To prevent
this duplication, we can use a <literal>let</literal>: this duplication, we can use a <literal>let</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
let let
commonConfig = commonConfig =
{ adminAddr = &quot;alice@example.org&quot;; { adminAddr = &quot;alice@example.org&quot;;
@ -55,7 +55,7 @@ in
You can write a <literal>let</literal> wherever an expression is You can write a <literal>let</literal> wherever an expression is
allowed. Thus, you also could have written: allowed. Thus, you also could have written:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.httpd.virtualHosts = services.httpd.virtualHosts =
let commonConfig = ...; in let commonConfig = ...; in
@ -74,7 +74,7 @@ in
of different virtual hosts, all with identical configuration except of different virtual hosts, all with identical configuration except
for the document root. This can be done as follows: for the document root. This can be done as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.httpd.virtualHosts = services.httpd.virtualHosts =
let let

View File

@ -7,7 +7,7 @@
network configuration not covered by the existing NixOS modules. For network configuration not covered by the existing NixOS modules. For
instance, to statically configure an IPv6 address: instance, to statically configure an IPv6 address:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.localCommands = networking.localCommands =
'' ''
ip -6 addr add 2001:610:685:1::1/64 dev eth0 ip -6 addr add 2001:610:685:1::1/64 dev eth0

View File

@ -28,7 +28,7 @@ $ cd nixpkgs
manual. Finally, you add it to manual. Finally, you add it to
<xref linkend="opt-environment.systemPackages" />, e.g. <xref linkend="opt-environment.systemPackages" />, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
environment.systemPackages = [ pkgs.my-package ]; environment.systemPackages = [ pkgs.my-package ];
</programlisting> </programlisting>
<para> <para>
@ -45,7 +45,7 @@ environment.systemPackages = [ pkgs.my-package ];
Hello</link> package directly in Hello</link> package directly in
<literal>configuration.nix</literal>: <literal>configuration.nix</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
environment.systemPackages = environment.systemPackages =
let let
my-hello = with pkgs; stdenv.mkDerivation rec { my-hello = with pkgs; stdenv.mkDerivation rec {
@ -62,13 +62,13 @@ environment.systemPackages =
Of course, you can also move the definition of Of course, you can also move the definition of
<literal>my-hello</literal> into a separate Nix expression, e.g. <literal>my-hello</literal> into a separate Nix expression, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
environment.systemPackages = [ (import ./my-hello.nix) ]; environment.systemPackages = [ (import ./my-hello.nix) ];
</programlisting> </programlisting>
<para> <para>
where <literal>my-hello.nix</literal> contains: where <literal>my-hello.nix</literal> contains:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
with import &lt;nixpkgs&gt; {}; # bring all of Nixpkgs into scope with import &lt;nixpkgs&gt; {}; # bring all of Nixpkgs into scope
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -98,7 +98,7 @@ Hello, world!
need to install <literal>appimage-run</literal>: add to need to install <literal>appimage-run</literal>: add to
<literal>/etc/nixos/configuration.nix</literal> <literal>/etc/nixos/configuration.nix</literal>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
environment.systemPackages = [ pkgs.appimage-run ]; environment.systemPackages = [ pkgs.appimage-run ];
</programlisting> </programlisting>
<para> <para>

View File

@ -3,7 +3,7 @@
<para> <para>
The NixOS configuration file generally looks like this: The NixOS configuration file generally looks like this:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
{ option definitions { option definitions
@ -21,7 +21,7 @@
the name of an option and <literal>value</literal> is its value. For the name of an option and <literal>value</literal> is its value. For
example, example,
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
{ services.httpd.enable = true; { services.httpd.enable = true;
@ -44,7 +44,7 @@
<literal>true</literal>. This means that the example above can also <literal>true</literal>. This means that the example above can also
be written as: be written as:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
{ services = { { services = {
@ -96,7 +96,7 @@ The option value `services.httpd.enable' in `/etc/nixos/configuration.nix' is no
<para> <para>
Strings are enclosed in double quotes, e.g. Strings are enclosed in double quotes, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.hostName = &quot;dexter&quot;; networking.hostName = &quot;dexter&quot;;
</programlisting> </programlisting>
<para> <para>
@ -107,7 +107,7 @@ networking.hostName = &quot;dexter&quot;;
Multi-line strings can be enclosed in <emphasis>double single Multi-line strings can be enclosed in <emphasis>double single
quotes</emphasis>, e.g. quotes</emphasis>, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.extraHosts = networking.extraHosts =
'' ''
127.0.0.2 other-localhost 127.0.0.2 other-localhost
@ -135,7 +135,7 @@ networking.extraHosts =
These can be <literal>true</literal> or These can be <literal>true</literal> or
<literal>false</literal>, e.g. <literal>false</literal>, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.firewall.enable = true; networking.firewall.enable = true;
networking.firewall.allowPing = false; networking.firewall.allowPing = false;
</programlisting> </programlisting>
@ -149,7 +149,7 @@ networking.firewall.allowPing = false;
<para> <para>
For example, For example,
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.kernel.sysctl.&quot;net.ipv4.tcp_keepalive_time&quot; = 60; boot.kernel.sysctl.&quot;net.ipv4.tcp_keepalive_time&quot; = 60;
</programlisting> </programlisting>
<para> <para>
@ -171,7 +171,7 @@ boot.kernel.sysctl.&quot;net.ipv4.tcp_keepalive_time&quot; = 60;
Sets were introduced above. They are name/value pairs enclosed Sets were introduced above. They are name/value pairs enclosed
in braces, as in the option definition in braces, as in the option definition
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
fileSystems.&quot;/boot&quot; = fileSystems.&quot;/boot&quot; =
{ device = &quot;/dev/sda1&quot;; { device = &quot;/dev/sda1&quot;;
fsType = &quot;ext4&quot;; fsType = &quot;ext4&quot;;
@ -189,13 +189,13 @@ fileSystems.&quot;/boot&quot; =
The important thing to note about lists is that list elements The important thing to note about lists is that list elements
are separated by whitespace, like this: are separated by whitespace, like this:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.kernelModules = [ &quot;fuse&quot; &quot;kvm-intel&quot; &quot;coretemp&quot; ]; boot.kernelModules = [ &quot;fuse&quot; &quot;kvm-intel&quot; &quot;coretemp&quot; ];
</programlisting> </programlisting>
<para> <para>
List elements can be any other type, e.g. sets: List elements can be any other type, e.g. sets:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
swapDevices = [ { device = &quot;/dev/disk/by-label/swap&quot;; } ]; swapDevices = [ { device = &quot;/dev/disk/by-label/swap&quot;; } ];
</programlisting> </programlisting>
</listitem> </listitem>
@ -211,7 +211,7 @@ swapDevices = [ { device = &quot;/dev/disk/by-label/swap&quot;; } ];
through the function argument <literal>pkgs</literal>. Typical through the function argument <literal>pkgs</literal>. Typical
uses: uses:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
environment.systemPackages = environment.systemPackages =
[ pkgs.thunderbird [ pkgs.thunderbird
pkgs.emacs pkgs.emacs

View File

@ -22,7 +22,7 @@
a dependency on GTK 2. If you want to build it against GTK 3, you a dependency on GTK 2. If you want to build it against GTK 3, you
can specify that as follows: can specify that as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ]; environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ];
</programlisting> </programlisting>
<para> <para>
@ -46,7 +46,7 @@ environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ];
the package, such as the source code. For instance, if you want to the package, such as the source code. For instance, if you want to
override the source code of Emacs, you can say: override the source code of Emacs, you can say:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
environment.systemPackages = [ environment.systemPackages = [
(pkgs.emacs.overrideAttrs (oldAttrs: { (pkgs.emacs.overrideAttrs (oldAttrs: {
name = &quot;emacs-25.0-pre&quot;; name = &quot;emacs-25.0-pre&quot;;
@ -72,7 +72,7 @@ environment.systemPackages = [
everything depend on your customised instance, you can apply a everything depend on your customised instance, you can apply a
<emphasis>global</emphasis> override as follows: <emphasis>global</emphasis> override as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
nixpkgs.config.packageOverrides = pkgs: nixpkgs.config.packageOverrides = pkgs:
{ emacs = pkgs.emacs.override { gtk = pkgs.gtk3; }; { emacs = pkgs.emacs.override { gtk = pkgs.gtk3; };
}; };

View File

@ -7,7 +7,7 @@
adding the following line to <literal>configuration.nix</literal> adding the following line to <literal>configuration.nix</literal>
enables the Mozilla Thunderbird email application: enables the Mozilla Thunderbird email application:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
environment.systemPackages = [ pkgs.thunderbird ]; environment.systemPackages = [ pkgs.thunderbird ];
</programlisting> </programlisting>
<para> <para>

View File

@ -7,7 +7,7 @@
<literal>/dev/disk/by-label/data</literal> onto the mount point <literal>/dev/disk/by-label/data</literal> onto the mount point
<literal>/data</literal>: <literal>/data</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
fileSystems.&quot;/data&quot; = fileSystems.&quot;/data&quot; =
{ device = &quot;/dev/disk/by-label/data&quot;; { device = &quot;/dev/disk/by-label/data&quot;;
fsType = &quot;ext4&quot;; fsType = &quot;ext4&quot;;

View File

@ -6,14 +6,14 @@
both IPv4 and IPv6 traffic. It is enabled by default. It can be both IPv4 and IPv6 traffic. It is enabled by default. It can be
disabled as follows: disabled as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.firewall.enable = false; networking.firewall.enable = false;
</programlisting> </programlisting>
<para> <para>
If the firewall is enabled, you can open specific TCP ports to the If the firewall is enabled, you can open specific TCP ports to the
outside world: outside world:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
</programlisting> </programlisting>
<para> <para>
@ -26,7 +26,7 @@ networking.firewall.allowedTCPPorts = [ 80 443 ];
<para> <para>
To open ranges of TCP ports: To open ranges of TCP ports:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.firewall.allowedTCPPortRanges = [ networking.firewall.allowedTCPPortRanges = [
{ from = 4000; to = 4007; } { from = 4000; to = 4007; }
{ from = 8000; to = 8010; } { from = 8000; to = 8010; }

View File

@ -62,7 +62,7 @@ Platform Vendor Advanced Micro Devices, Inc.
<xref linkend="opt-hardware.opengl.extraPackages" /> enables <xref linkend="opt-hardware.opengl.extraPackages" /> enables
OpenCL support: OpenCL support:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
hardware.opengl.extraPackages = [ hardware.opengl.extraPackages = [
rocm-opencl-icd rocm-opencl-icd
]; ];
@ -85,7 +85,7 @@ hardware.opengl.extraPackages = [
enable OpenCL support. For example, for Gen8 and later GPUs, the enable OpenCL support. For example, for Gen8 and later GPUs, the
following configuration can be used: following configuration can be used:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
hardware.opengl.extraPackages = [ hardware.opengl.extraPackages = [
intel-compute-runtime intel-compute-runtime
]; ];
@ -162,7 +162,7 @@ GPU1:
makes amdvlk the default driver and hides radv and lavapipe from makes amdvlk the default driver and hides radv and lavapipe from
the device list. A specific driver can be forced as follows: the device list. A specific driver can be forced as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
hardware.opengl.extraPackages = [ hardware.opengl.extraPackages = [
pkgs.amdvlk pkgs.amdvlk
]; ];
@ -206,7 +206,7 @@ $ nix-shell -p libva-utils --run vainfo
Modern Intel GPUs use the iHD driver, which can be installed Modern Intel GPUs use the iHD driver, which can be installed
with: with:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
hardware.opengl.extraPackages = [ hardware.opengl.extraPackages = [
intel-media-driver intel-media-driver
]; ];
@ -215,7 +215,7 @@ hardware.opengl.extraPackages = [
Older Intel GPUs use the i965 driver, which can be installed Older Intel GPUs use the i965 driver, which can be installed
with: with:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
hardware.opengl.extraPackages = [ hardware.opengl.extraPackages = [
vaapiIntel vaapiIntel
]; ];

View File

@ -6,7 +6,7 @@
interfaces. However, you can configure an interface manually as interfaces. However, you can configure an interface manually as
follows: follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.interfaces.eth0.ipv4.addresses = [ { networking.interfaces.eth0.ipv4.addresses = [ {
address = &quot;192.168.1.2&quot;; address = &quot;192.168.1.2&quot;;
prefixLength = 24; prefixLength = 24;
@ -16,7 +16,7 @@ networking.interfaces.eth0.ipv4.addresses = [ {
Typically youll also want to set a default gateway and set of name Typically youll also want to set a default gateway and set of name
servers: servers:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.defaultGateway = &quot;192.168.1.1&quot;; networking.defaultGateway = &quot;192.168.1.1&quot;;
networking.nameservers = [ &quot;8.8.8.8&quot; ]; networking.nameservers = [ &quot;8.8.8.8&quot; ];
</programlisting> </programlisting>
@ -32,7 +32,7 @@ networking.nameservers = [ &quot;8.8.8.8&quot; ];
The host name is set using The host name is set using
<xref linkend="opt-networking.hostName" />: <xref linkend="opt-networking.hostName" />:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.hostName = &quot;cartman&quot;; networking.hostName = &quot;cartman&quot;;
</programlisting> </programlisting>
<para> <para>

View File

@ -10,21 +10,21 @@
<xref linkend="opt-networking.interfaces._name_.tempAddress" />. You <xref linkend="opt-networking.interfaces._name_.tempAddress" />. You
can disable IPv6 support globally by setting: can disable IPv6 support globally by setting:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.enableIPv6 = false; networking.enableIPv6 = false;
</programlisting> </programlisting>
<para> <para>
You can disable IPv6 on a single interface using a normal sysctl (in You can disable IPv6 on a single interface using a normal sysctl (in
this example, we use interface <literal>eth0</literal>): this example, we use interface <literal>eth0</literal>):
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.kernel.sysctl.&quot;net.ipv6.conf.eth0.disable_ipv6&quot; = true; boot.kernel.sysctl.&quot;net.ipv6.conf.eth0.disable_ipv6&quot; = true;
</programlisting> </programlisting>
<para> <para>
As with IPv4 networking interfaces are automatically configured via As with IPv4 networking interfaces are automatically configured via
DHCPv6. You can configure an interface manually: DHCPv6. You can configure an interface manually:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.interfaces.eth0.ipv6.addresses = [ { networking.interfaces.eth0.ipv6.addresses = [ {
address = &quot;fe00:aa:bb:cc::2&quot;; address = &quot;fe00:aa:bb:cc::2&quot;;
prefixLength = 64; prefixLength = 64;
@ -34,7 +34,7 @@ networking.interfaces.eth0.ipv6.addresses = [ {
For configuring a gateway, optionally with explicitly specified For configuring a gateway, optionally with explicitly specified
interface: interface:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.defaultGateway6 = { networking.defaultGateway6 = {
address = &quot;fe00::1&quot;; address = &quot;fe00::1&quot;;
interface = &quot;enp0s3&quot;; interface = &quot;enp0s3&quot;;

View File

@ -10,7 +10,7 @@
way is to enable and configure cluster components appropriately by way is to enable and configure cluster components appropriately by
hand: hand:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.kubernetes = { services.kubernetes = {
apiserver.enable = true; apiserver.enable = true;
controllerManager.enable = true; controllerManager.enable = true;
@ -21,24 +21,24 @@ services.kubernetes = {
}; };
</programlisting> </programlisting>
<para> <para>
Another way is to assign cluster roles (&quot;master&quot; and/or Another way is to assign cluster roles (<quote>master</quote> and/or
&quot;node&quot;) to the host. This enables apiserver, <quote>node</quote>) to the host. This enables apiserver,
controllerManager, scheduler, addonManager, kube-proxy and etcd: controllerManager, scheduler, addonManager, kube-proxy and etcd:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.kubernetes.roles = [ &quot;master&quot; ]; services.kubernetes.roles = [ &quot;master&quot; ];
</programlisting> </programlisting>
<para> <para>
While this will enable the kubelet and kube-proxy only: While this will enable the kubelet and kube-proxy only:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.kubernetes.roles = [ &quot;node&quot; ]; services.kubernetes.roles = [ &quot;node&quot; ];
</programlisting> </programlisting>
<para> <para>
Assigning both the master and node roles is usable if you want a Assigning both the master and node roles is usable if you want a
single node Kubernetes cluster for dev or testing purposes: single node Kubernetes cluster for dev or testing purposes:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.kubernetes.roles = [ &quot;master&quot; &quot;node&quot; ]; services.kubernetes.roles = [ &quot;master&quot; &quot;node&quot; ];
</programlisting> </programlisting>
<para> <para>

View File

@ -5,7 +5,7 @@
option <literal>boot.kernelPackages</literal>. For instance, this option <literal>boot.kernelPackages</literal>. For instance, this
selects the Linux 3.10 kernel: selects the Linux 3.10 kernel:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_10; boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_10;
</programlisting> </programlisting>
<para> <para>
@ -48,7 +48,7 @@ zcat /proc/config.gz
<xref linkend="sec-customising-packages" />). For instance, to <xref linkend="sec-customising-packages" />). For instance, to
enable support for the kernel debugger KGDB: enable support for the kernel debugger KGDB:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
nixpkgs.config.packageOverrides = pkgs: pkgs.lib.recursiveUpdate pkgs { nixpkgs.config.packageOverrides = pkgs: pkgs.lib.recursiveUpdate pkgs {
linuxKernel.kernels.linux_5_10 = pkgs.linuxKernel.kernels.linux_5_10.override { linuxKernel.kernels.linux_5_10 = pkgs.linuxKernel.kernels.linux_5_10.override {
extraConfig = '' extraConfig = ''
@ -69,7 +69,7 @@ nixpkgs.config.packageOverrides = pkgs: pkgs.lib.recursiveUpdate pkgs {
automatically by <literal>udev</literal>. You can force a module to automatically by <literal>udev</literal>. You can force a module to
be loaded via <xref linkend="opt-boot.kernelModules" />, e.g. be loaded via <xref linkend="opt-boot.kernelModules" />, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.kernelModules = [ &quot;fuse&quot; &quot;kvm-intel&quot; &quot;coretemp&quot; ]; boot.kernelModules = [ &quot;fuse&quot; &quot;kvm-intel&quot; &quot;coretemp&quot; ];
</programlisting> </programlisting>
<para> <para>
@ -77,7 +77,7 @@ boot.kernelModules = [ &quot;fuse&quot; &quot;kvm-intel&quot; &quot;coretemp&quo
root file system), you can use root file system), you can use
<xref linkend="opt-boot.initrd.kernelModules" />: <xref linkend="opt-boot.initrd.kernelModules" />:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.initrd.kernelModules = [ &quot;cifs&quot; ]; boot.initrd.kernelModules = [ &quot;cifs&quot; ];
</programlisting> </programlisting>
<para> <para>
@ -88,7 +88,7 @@ boot.initrd.kernelModules = [ &quot;cifs&quot; ];
Kernel runtime parameters can be set through Kernel runtime parameters can be set through
<xref linkend="opt-boot.kernel.sysctl" />, e.g. <xref linkend="opt-boot.kernel.sysctl" />, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.kernel.sysctl.&quot;net.ipv4.tcp_keepalive_time&quot; = 120; boot.kernel.sysctl.&quot;net.ipv4.tcp_keepalive_time&quot; = 120;
</programlisting> </programlisting>
<para> <para>
@ -101,7 +101,7 @@ boot.kernel.sysctl.&quot;net.ipv4.tcp_keepalive_time&quot; = 120;
You can customize the default kernel configuration by overriding You can customize the default kernel configuration by overriding
the arguments for your kernel package: the arguments for your kernel package:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
pkgs.linux_latest.override { pkgs.linux_latest.override {
ignoreConfigErrors = true; ignoreConfigErrors = true;
autoModules = false; autoModules = false;
@ -126,7 +126,7 @@ pkgs.linux_latest.override {
<para> <para>
To use your custom kernel package in your NixOS configuration, set To use your custom kernel package in your NixOS configuration, set
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.kernelPackages = pkgs.linuxPackagesFor yourCustomKernel; boot.kernelPackages = pkgs.linuxPackagesFor yourCustomKernel;
</programlisting> </programlisting>
<para> <para>
@ -139,7 +139,7 @@ boot.kernelPackages = pkgs.linuxPackagesFor yourCustomKernel;
a kernel that uses it with a kernel that uses it with
<literal>pkgs.linuxManualConfig</literal>: <literal>pkgs.linuxManualConfig</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
let let
baseKernel = pkgs.linux_latest; baseKernel = pkgs.linux_latest;
in pkgs.linuxManualConfig { in pkgs.linuxManualConfig {
@ -198,7 +198,7 @@ $ make -C $dev/lib/modules/*/build M=$(pwd)/drivers/net/ethernet/mellanox module
available kernel version <emphasis>that is supported by available kernel version <emphasis>that is supported by
ZFS</emphasis> like this: ZFS</emphasis> like this:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages; boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
} }

View File

@ -30,7 +30,7 @@ Enter passphrase for /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d: ***
at boot time as <literal>/</literal>, add the following to at boot time as <literal>/</literal>, add the following to
<literal>configuration.nix</literal>: <literal>configuration.nix</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.initrd.luks.devices.crypted.device = &quot;/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d&quot;; boot.initrd.luks.devices.crypted.device = &quot;/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d&quot;;
fileSystems.&quot;/&quot;.device = &quot;/dev/mapper/crypted&quot;; fileSystems.&quot;/&quot;.device = &quot;/dev/mapper/crypted&quot;;
</programlisting> </programlisting>
@ -39,7 +39,7 @@ fileSystems.&quot;/&quot;.device = &quot;/dev/mapper/crypted&quot;;
located on an encrypted partition, it is necessary to add the located on an encrypted partition, it is necessary to add the
following grub option: following grub option:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.loader.grub.enableCryptodisk = true; boot.loader.grub.enableCryptodisk = true;
</programlisting> </programlisting>
<section xml:id="sec-luks-file-systems-fido2"> <section xml:id="sec-luks-file-systems-fido2">
@ -67,7 +67,7 @@ Added to key to device /dev/sda2, slot: 2
compatible key, add the following to compatible key, add the following to
<literal>configuration.nix</literal>: <literal>configuration.nix</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.initrd.luks.fido2Support = true; boot.initrd.luks.fido2Support = true;
boot.initrd.luks.devices.&quot;/dev/sda2&quot;.fido2.credential = &quot;f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7&quot;; boot.initrd.luks.devices.&quot;/dev/sda2&quot;.fido2.credential = &quot;f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7&quot;;
</programlisting> </programlisting>
@ -77,7 +77,7 @@ boot.initrd.luks.devices.&quot;/dev/sda2&quot;.fido2.credential = &quot;f1d00200
protected, such as protected, such as
<link xlink:href="https://trezor.io/">Trezor</link>. <link xlink:href="https://trezor.io/">Trezor</link>.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.initrd.luks.devices.&quot;/dev/sda2&quot;.fido2.passwordLess = true; boot.initrd.luks.devices.&quot;/dev/sda2&quot;.fido2.passwordLess = true;
</programlisting> </programlisting>
</section> </section>

View File

@ -14,7 +14,7 @@
other modules by including them from other modules by including them from
<literal>configuration.nix</literal>, e.g.: <literal>configuration.nix</literal>, e.g.:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
{ imports = [ ./vpn.nix ./kde.nix ]; { imports = [ ./vpn.nix ./kde.nix ];
@ -28,7 +28,7 @@
<literal>vpn.nix</literal> and <literal>kde.nix</literal>. The <literal>vpn.nix</literal> and <literal>kde.nix</literal>. The
latter might look like this: latter might look like this:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
{ services.xserver.enable = true; { services.xserver.enable = true;
@ -50,7 +50,7 @@
you want it to appear first, you can use you want it to appear first, you can use
<literal>mkBefore</literal>: <literal>mkBefore</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.kernelModules = mkBefore [ &quot;kvm-intel&quot; ]; boot.kernelModules = mkBefore [ &quot;kvm-intel&quot; ];
</programlisting> </programlisting>
<para> <para>
@ -70,7 +70,7 @@ The unique option `services.httpd.adminAddr' is defined multiple times, in `/etc
When that happens, its possible to force one definition take When that happens, its possible to force one definition take
precedence over the others: precedence over the others:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.httpd.adminAddr = pkgs.lib.mkForce &quot;bob@example.org&quot;; services.httpd.adminAddr = pkgs.lib.mkForce &quot;bob@example.org&quot;;
</programlisting> </programlisting>
<para> <para>
@ -93,7 +93,7 @@ services.httpd.adminAddr = pkgs.lib.mkForce &quot;bob@example.org&quot;;
<xref linkend="opt-services.xserver.enable" /> is set to <xref linkend="opt-services.xserver.enable" /> is set to
<literal>true</literal> somewhere else: <literal>true</literal> somewhere else:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
{ environment.systemPackages = { environment.systemPackages =
@ -137,7 +137,7 @@ nix-repl&gt; map (x: x.hostName) config.services.httpd.virtualHosts
below would have the same effect as importing a file which sets below would have the same effect as importing a file which sets
those options. those options.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
let netConfig = hostName: { let netConfig = hostName: {

View File

@ -4,7 +4,7 @@
To facilitate network configuration, some desktop environments use To facilitate network configuration, some desktop environments use
NetworkManager. You can enable NetworkManager by setting: NetworkManager. You can enable NetworkManager by setting:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
</programlisting> </programlisting>
<para> <para>
@ -15,7 +15,7 @@ networking.networkmanager.enable = true;
All users that should have permission to change network settings All users that should have permission to change network settings
must belong to the <literal>networkmanager</literal> group: must belong to the <literal>networkmanager</literal> group:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
users.users.alice.extraGroups = [ &quot;networkmanager&quot; ]; users.users.alice.extraGroups = [ &quot;networkmanager&quot; ];
</programlisting> </programlisting>
<para> <para>
@ -36,7 +36,7 @@ users.users.alice.extraGroups = [ &quot;networkmanager&quot; ];
used together if desired. To do this you need to instruct used together if desired. To do this you need to instruct
NetworkManager to ignore those interfaces like: NetworkManager to ignore those interfaces like:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.networkmanager.unmanaged = [ networking.networkmanager.unmanaged = [
&quot;*&quot; &quot;except:type:wwan&quot; &quot;except:type:gsm&quot; &quot;*&quot; &quot;except:type:wwan&quot; &quot;except:type:gsm&quot;
]; ];

View File

@ -4,12 +4,12 @@
In some cases, it may be desirable to take advantage of In some cases, it may be desirable to take advantage of
commonly-used, predefined configurations provided by nixpkgs, but commonly-used, predefined configurations provided by nixpkgs, but
different from those that come as default. This is a role fulfilled different from those that come as default. This is a role fulfilled
by NixOS's Profiles, which come as files living in by NixOSs Profiles, which come as files living in
<literal>&lt;nixpkgs/nixos/modules/profiles&gt;</literal>. That is <literal>&lt;nixpkgs/nixos/modules/profiles&gt;</literal>. That is
to say, expected usage is to add them to the imports list of your to say, expected usage is to add them to the imports list of your
<literal>/etc/configuration.nix</literal> as such: <literal>/etc/configuration.nix</literal> as such:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
imports = [ imports = [
&lt;nixpkgs/nixos/modules/profiles/profile-name.nix&gt; &lt;nixpkgs/nixos/modules/profiles/profile-name.nix&gt;
]; ];

View File

@ -30,7 +30,7 @@
the interface with MAC address the interface with MAC address
<literal>52:54:00:12:01:01</literal> using a netword link unit: <literal>52:54:00:12:01:01</literal> using a netword link unit:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
systemd.network.links.&quot;10-wan&quot; = { systemd.network.links.&quot;10-wan&quot; = {
matchConfig.PermanentMACAddress = &quot;52:54:00:12:01:01&quot;; matchConfig.PermanentMACAddress = &quot;52:54:00:12:01:01&quot;;
linkConfig.Name = &quot;wan&quot;; linkConfig.Name = &quot;wan&quot;;
@ -43,7 +43,7 @@ systemd.network.links.&quot;10-wan&quot; = {
<para> <para>
Alternatively, we can use a plain old udev rule: Alternatively, we can use a plain old udev rule:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.udev.initrdRules = '' services.udev.initrdRules = ''
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, \ SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, \
ATTR{address}==&quot;52:54:00:12:01:01&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;wan&quot; ATTR{address}==&quot;52:54:00:12:01:01&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;wan&quot;

View File

@ -3,7 +3,7 @@
<para> <para>
Secure shell (SSH) access to your machine can be enabled by setting: Secure shell (SSH) access to your machine can be enabled by setting:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.openssh.enable = true; services.openssh.enable = true;
</programlisting> </programlisting>
<para> <para>
@ -16,7 +16,7 @@ services.openssh.enable = true;
You can declaratively specify authorised RSA/DSA public keys for a You can declaratively specify authorised RSA/DSA public keys for a
user as follows: user as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
users.users.alice.openssh.authorizedKeys.keys = users.users.alice.openssh.authorizedKeys.keys =
[ &quot;ssh-dss AAAAB3NzaC1kc3MAAACBAPIkGWVEt4...&quot; ]; [ &quot;ssh-dss AAAAB3NzaC1kc3MAAACBAPIkGWVEt4...&quot; ];
</programlisting> </programlisting>

View File

@ -54,7 +54,7 @@ SHA256:yjxl3UbTn31fLWeyLYTAKYJPRmzknjQZoyG8gSNEoIE my-user@workstation
<link linkend="opt-fileSystems">fileSystems</link> option. Heres <link linkend="opt-fileSystems">fileSystems</link> option. Heres
a typical setup: a typical setup:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
system.fsPackages = [ pkgs.sshfs ]; system.fsPackages = [ pkgs.sshfs ];
@ -80,7 +80,7 @@ SHA256:yjxl3UbTn31fLWeyLYTAKYJPRmzknjQZoyG8gSNEoIE my-user@workstation
well, for example you can change the default SSH port or specify a well, for example you can change the default SSH port or specify a
jump proxy: jump proxy:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
options = options =
[ &quot;ProxyJump=bastion@example.com&quot; [ &quot;ProxyJump=bastion@example.com&quot;
@ -92,7 +92,7 @@ SHA256:yjxl3UbTn31fLWeyLYTAKYJPRmzknjQZoyG8gSNEoIE my-user@workstation
Its also possible to change the <literal>ssh</literal> command Its also possible to change the <literal>ssh</literal> command
used by SSHFS to connect to the server. For example: used by SSHFS to connect to the server. For example:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
options = options =
[ (builtins.replaceStrings [&quot; &quot;] [&quot;\\040&quot;] [ (builtins.replaceStrings [&quot; &quot;] [&quot;\\040&quot;]

View File

@ -25,7 +25,7 @@
Apache HTTP, setting Apache HTTP, setting
<xref linkend="opt-services.httpd.adminAddr" /> appropriately: <xref linkend="opt-services.httpd.adminAddr" /> appropriately:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.httpd.enable = true; services.httpd.enable = true;
services.httpd.adminAddr = ...; services.httpd.adminAddr = ...;
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
@ -40,7 +40,7 @@ networking.firewall.allowedTCPPorts = [ 80 443 ];
<literal>.authz</literal> file describing access permission, and <literal>.authz</literal> file describing access permission, and
<literal>AuthUserFile</literal> to the password file. <literal>AuthUserFile</literal> to the password file.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.httpd.extraModules = [ services.httpd.extraModules = [
# note that order is *super* important here # note that order is *super* important here
{ name = &quot;dav_svn&quot;; path = &quot;${pkgs.apacheHttpdPackages.subversion}/modules/mod_dav_svn.so&quot;; } { name = &quot;dav_svn&quot;; path = &quot;${pkgs.apacheHttpdPackages.subversion}/modules/mod_dav_svn.so&quot;; }
@ -106,7 +106,7 @@ $ htpasswd -s PASSWORD_FILE USER_NAME
<literal>ACCESS_FILE</literal> will look something like the <literal>ACCESS_FILE</literal> will look something like the
following: following:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
[/] [/]
* = r * = r

View File

@ -7,7 +7,7 @@
states that a user account named <literal>alice</literal> shall states that a user account named <literal>alice</literal> shall
exist: exist:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
users.users.alice = { users.users.alice = {
isNormalUser = true; isNormalUser = true;
home = &quot;/home/alice&quot;; home = &quot;/home/alice&quot;;
@ -36,7 +36,7 @@ users.users.alice = {
<xref linkend="opt-users.users" /> and run nixos-rebuild, the user <xref linkend="opt-users.users" /> and run nixos-rebuild, the user
account will cease to exist. Also, imperative commands for managing account will cease to exist. Also, imperative commands for managing
users and groups, such as useradd, are no longer available. users and groups, such as useradd, are no longer available.
Passwords may still be assigned by setting the user's Passwords may still be assigned by setting the users
<link linkend="opt-users.users._name_.hashedPassword">hashedPassword</link> <link linkend="opt-users.users._name_.hashedPassword">hashedPassword</link>
option. A hashed password can be generated using option. A hashed password can be generated using
<literal>mkpasswd</literal>. <literal>mkpasswd</literal>.
@ -45,7 +45,7 @@ users.users.alice = {
A user ID (uid) is assigned automatically. You can also specify a A user ID (uid) is assigned automatically. You can also specify a
uid manually by adding uid manually by adding
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
uid = 1000; uid = 1000;
</programlisting> </programlisting>
<para> <para>
@ -55,7 +55,7 @@ uid = 1000;
Groups can be specified similarly. The following states that a group Groups can be specified similarly. The following states that a group
named <literal>students</literal> shall exist: named <literal>students</literal> shall exist:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
users.groups.students.gid = 1000; users.groups.students.gid = 1000;
</programlisting> </programlisting>
<para> <para>

View File

@ -5,11 +5,12 @@
display technology on NixOS, Wayland support is steadily improving. display technology on NixOS, Wayland support is steadily improving.
Where X11 separates the X Server and the window manager, on Wayland Where X11 separates the X Server and the window manager, on Wayland
those are combined: a Wayland Compositor is like an X11 window those are combined: a Wayland Compositor is like an X11 window
manager, but also embeds the Wayland 'Server' functionality. This manager, but also embeds the Wayland <quote>Server</quote>
means it is sufficient to install a Wayland Compositor such as sway functionality. This means it is sufficient to install a Wayland
without separately enabling a Wayland server: Compositor such as sway without separately enabling a Wayland
server:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
programs.sway.enable = true; programs.sway.enable = true;
</programlisting> </programlisting>
<para> <para>
@ -21,7 +22,7 @@ programs.sway.enable = true;
be able to share your screen, you might want to activate this be able to share your screen, you might want to activate this
option: option:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
xdg.portal.wlr.enable = true; xdg.portal.wlr.enable = true;
</programlisting> </programlisting>
<para> <para>

View File

@ -9,13 +9,13 @@
<para> <para>
NixOS will start wpa_supplicant for you if you enable this setting: NixOS will start wpa_supplicant for you if you enable this setting:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.wireless.enable = true; networking.wireless.enable = true;
</programlisting> </programlisting>
<para> <para>
NixOS lets you specify networks for wpa_supplicant declaratively: NixOS lets you specify networks for wpa_supplicant declaratively:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.wireless.networks = { networking.wireless.networks = {
echelon = { # SSID with no spaces or special characters echelon = { # SSID with no spaces or special characters
psk = &quot;abcdefgh&quot;; psk = &quot;abcdefgh&quot;;
@ -49,7 +49,7 @@ network={
psk=dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435 psk=dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435
} }
</programlisting> </programlisting>
<programlisting language="bash"> <programlisting language="nix">
networking.wireless.networks = { networking.wireless.networks = {
echelon = { echelon = {
pskRaw = &quot;dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435&quot;; pskRaw = &quot;dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435&quot;;

View File

@ -4,7 +4,7 @@
The X Window System (X11) provides the basis of NixOS graphical The X Window System (X11) provides the basis of NixOS graphical
user interface. It can be enabled as follows: user interface. It can be enabled as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.enable = true; services.xserver.enable = true;
</programlisting> </programlisting>
<para> <para>
@ -13,7 +13,7 @@ services.xserver.enable = true;
and <literal>intel</literal>). You can also specify a driver and <literal>intel</literal>). You can also specify a driver
manually, e.g. manually, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.videoDrivers = [ &quot;r128&quot; ]; services.xserver.videoDrivers = [ &quot;r128&quot; ];
</programlisting> </programlisting>
<para> <para>
@ -25,7 +25,7 @@ services.xserver.videoDrivers = [ &quot;r128&quot; ];
<literal>xterm</literal> window. Thus you should pick one or more of <literal>xterm</literal> window. Thus you should pick one or more of
the following lines: the following lines:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.plasma5.enable = true;
services.xserver.desktopManager.xfce.enable = true; services.xserver.desktopManager.xfce.enable = true;
services.xserver.desktopManager.gnome.enable = true; services.xserver.desktopManager.gnome.enable = true;
@ -42,14 +42,14 @@ services.xserver.windowManager.herbstluftwm.enable = true;
LightDM. You can select an alternative one by picking one of the LightDM. You can select an alternative one by picking one of the
following lines: following lines:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
</programlisting> </programlisting>
<para> <para>
You can set the keyboard layout (and optionally the layout variant): You can set the keyboard layout (and optionally the layout variant):
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.layout = &quot;de&quot;; services.xserver.layout = &quot;de&quot;;
services.xserver.xkbVariant = &quot;neo&quot;; services.xserver.xkbVariant = &quot;neo&quot;;
</programlisting> </programlisting>
@ -57,7 +57,7 @@ services.xserver.xkbVariant = &quot;neo&quot;;
The X server is started automatically at boot time. If you dont The X server is started automatically at boot time. If you dont
want this to happen, you can set: want this to happen, you can set:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.autorun = false; services.xserver.autorun = false;
</programlisting> </programlisting>
<para> <para>
@ -70,7 +70,7 @@ services.xserver.autorun = false;
On 64-bit systems, if you want OpenGL for 32-bit programs such as in On 64-bit systems, if you want OpenGL for 32-bit programs such as in
Wine, you should also set the following: Wine, you should also set the following:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
</programlisting> </programlisting>
<section xml:id="sec-x11-auto-login"> <section xml:id="sec-x11-auto-login">
@ -88,16 +88,16 @@ hardware.opengl.driSupport32Bit = true;
<para> <para>
To enable auto-login, you need to define your default window To enable auto-login, you need to define your default window
manager and desktop environment. If you wanted no desktop manager and desktop environment. If you wanted no desktop
environment and i3 as your your window manager, you'd define: environment and i3 as your your window manager, youd define:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.displayManager.defaultSession = &quot;none+i3&quot;; services.xserver.displayManager.defaultSession = &quot;none+i3&quot;;
</programlisting> </programlisting>
<para> <para>
Every display manager in NixOS supports auto-login, here is an Every display manager in NixOS supports auto-login, here is an
example using lightdm for a user <literal>alice</literal>: example using lightdm for a user <literal>alice</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.displayManager.lightdm.enable = true; services.xserver.displayManager.lightdm.enable = true;
services.xserver.displayManager.autoLogin.enable = true; services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = &quot;alice&quot;; services.xserver.displayManager.autoLogin.user = &quot;alice&quot;;
@ -122,8 +122,8 @@ services.xserver.displayManager.autoLogin.user = &quot;alice&quot;;
<para> <para>
The second driver, <literal>intel</literal>, is specific to Intel The second driver, <literal>intel</literal>, is specific to Intel
GPUs, but not recommended by most distributions: it lacks several GPUs, but not recommended by most distributions: it lacks several
modern features (for example, it doesn't support Glamor) and the modern features (for example, it doesnt support Glamor) and the
package hasn't been officially updated since 2015. package hasnt been officially updated since 2015.
</para> </para>
<para> <para>
The results vary depending on the hardware, so you may have to try The results vary depending on the hardware, so you may have to try
@ -131,14 +131,14 @@ services.xserver.displayManager.autoLogin.user = &quot;alice&quot;;
<xref linkend="opt-services.xserver.videoDrivers" /> to set one. <xref linkend="opt-services.xserver.videoDrivers" /> to set one.
The recommended configuration for modern systems is: The recommended configuration for modern systems is:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.videoDrivers = [ &quot;modesetting&quot; ]; services.xserver.videoDrivers = [ &quot;modesetting&quot; ];
</programlisting> </programlisting>
<para> <para>
If you experience screen tearing no matter what, this If you experience screen tearing no matter what, this
configuration was reported to resolve the issue: configuration was reported to resolve the issue:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.videoDrivers = [ &quot;intel&quot; ]; services.xserver.videoDrivers = [ &quot;intel&quot; ];
services.xserver.deviceSection = '' services.xserver.deviceSection = ''
Option &quot;DRI&quot; &quot;2&quot; Option &quot;DRI&quot; &quot;2&quot;
@ -159,14 +159,14 @@ services.xserver.deviceSection = ''
enabled by default because its not free software. You can enable enabled by default because its not free software. You can enable
it as follows: it as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.videoDrivers = [ &quot;nvidia&quot; ]; services.xserver.videoDrivers = [ &quot;nvidia&quot; ];
</programlisting> </programlisting>
<para> <para>
Or if you have an older card, you may have to use one of the Or if you have an older card, you may have to use one of the
legacy drivers: legacy drivers:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.videoDrivers = [ &quot;nvidiaLegacy390&quot; ]; services.xserver.videoDrivers = [ &quot;nvidiaLegacy390&quot; ];
services.xserver.videoDrivers = [ &quot;nvidiaLegacy340&quot; ]; services.xserver.videoDrivers = [ &quot;nvidiaLegacy340&quot; ];
services.xserver.videoDrivers = [ &quot;nvidiaLegacy304&quot; ]; services.xserver.videoDrivers = [ &quot;nvidiaLegacy304&quot; ];
@ -181,11 +181,11 @@ services.xserver.videoDrivers = [ &quot;nvidiaLegacy304&quot; ];
<para> <para>
AMD provides a proprietary driver for its graphics cards that is AMD provides a proprietary driver for its graphics cards that is
not enabled by default because its not Free Software, is often not enabled by default because its not Free Software, is often
broken in nixpkgs and as of this writing doesn't offer more broken in nixpkgs and as of this writing doesnt offer more
features or performance. If you still want to use it anyway, you features or performance. If you still want to use it anyway, you
need to explicitly set: need to explicitly set:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.videoDrivers = [ &quot;amdgpu-pro&quot; ]; services.xserver.videoDrivers = [ &quot;amdgpu-pro&quot; ];
</programlisting> </programlisting>
<para> <para>
@ -199,14 +199,14 @@ services.xserver.videoDrivers = [ &quot;amdgpu-pro&quot; ];
Support for Synaptics touchpads (found in many laptops such as the Support for Synaptics touchpads (found in many laptops such as the
Dell Latitude series) can be enabled as follows: Dell Latitude series) can be enabled as follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.libinput.enable = true; services.xserver.libinput.enable = true;
</programlisting> </programlisting>
<para> <para>
The driver has many options (see <xref linkend="ch-options" />). The driver has many options (see <xref linkend="ch-options" />).
For instance, the following disables tap-to-click behavior: For instance, the following disables tap-to-click behavior:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.libinput.touchpad.tapping = false; services.xserver.libinput.touchpad.tapping = false;
</programlisting> </programlisting>
<para> <para>
@ -222,7 +222,7 @@ services.xserver.libinput.touchpad.tapping = false;
applications look similar to GTK ones, you can use the following applications look similar to GTK ones, you can use the following
configuration: configuration:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
qt5.enable = true; qt5.enable = true;
qt5.platformTheme = &quot;gtk2&quot;; qt5.platformTheme = &quot;gtk2&quot;;
qt5.style = &quot;gtk2&quot;; qt5.style = &quot;gtk2&quot;;
@ -244,10 +244,10 @@ qt5.style = &quot;gtk2&quot;;
<para> <para>
Create a file called <literal>us-greek</literal> with the Create a file called <literal>us-greek</literal> with the
following content (under a directory called following content (under a directory called
<literal>symbols</literal>; it's an XKB peculiarity that will help <literal>symbols</literal>; its an XKB peculiarity that will help
with testing): with testing):
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
xkb_symbols &quot;us-greek&quot; xkb_symbols &quot;us-greek&quot;
{ {
include &quot;us(basic)&quot; // includes the base US keys include &quot;us(basic)&quot; // includes the base US keys
@ -263,7 +263,7 @@ xkb_symbols &quot;us-greek&quot;
<para> <para>
A minimal layout specification must include the following: A minimal layout specification must include the following:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.extraLayouts.us-greek = { services.xserver.extraLayouts.us-greek = {
description = &quot;US layout with alt-gr greek&quot;; description = &quot;US layout with alt-gr greek&quot;;
languages = [ &quot;eng&quot; ]; languages = [ &quot;eng&quot; ];
@ -279,7 +279,7 @@ services.xserver.extraLayouts.us-greek = {
<para> <para>
Applying this customization requires rebuilding several packages, Applying this customization requires rebuilding several packages,
and a broken XKB file can lead to the X session crashing at login. and a broken XKB file can lead to the X session crashing at login.
Therefore, you're strongly advised to <emphasis role="strong">test Therefore, youre strongly advised to <emphasis role="strong">test
your layout before applying it</emphasis>: your layout before applying it</emphasis>:
</para> </para>
<programlisting> <programlisting>
@ -312,7 +312,7 @@ $ echo &quot;$(nix-build --no-out-link '&lt;nixpkgs&gt;' -A xorg.xkeyboardconfig
interest, then create a <literal>media-key</literal> file to hold interest, then create a <literal>media-key</literal> file to hold
the keycodes definitions the keycodes definitions
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
xkb_keycodes &quot;media&quot; xkb_keycodes &quot;media&quot;
{ {
&lt;volUp&gt; = 123; &lt;volUp&gt; = 123;
@ -322,7 +322,7 @@ xkb_keycodes &quot;media&quot;
<para> <para>
Now use the newly define keycodes in <literal>media-sym</literal>: Now use the newly define keycodes in <literal>media-sym</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
xkb_symbols &quot;media&quot; xkb_symbols &quot;media&quot;
{ {
key.type = &quot;ONE_LEVEL&quot;; key.type = &quot;ONE_LEVEL&quot;;
@ -333,7 +333,7 @@ xkb_symbols &quot;media&quot;
<para> <para>
As before, to install the layout do As before, to install the layout do
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.extraLayouts.media = { services.xserver.extraLayouts.media = {
description = &quot;Multimedia keys remapping&quot;; description = &quot;Multimedia keys remapping&quot;;
languages = [ &quot;eng&quot; ]; languages = [ &quot;eng&quot; ];
@ -352,18 +352,18 @@ services.xserver.extraLayouts.media = {
<para> <para>
Unfortunately, the Xorg server does not (currently) support Unfortunately, the Xorg server does not (currently) support
setting a keymap directly but relies instead on XKB rules to setting a keymap directly but relies instead on XKB rules to
select the matching components (keycodes, types, ...) of a layout. select the matching components (keycodes, types, ) of a layout.
This means that components other than symbols won't be loaded by This means that components other than symbols wont be loaded by
default. As a workaround, you can set the keymap using default. As a workaround, you can set the keymap using
<literal>setxkbmap</literal> at the start of the session with: <literal>setxkbmap</literal> at the start of the session with:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.displayManager.sessionCommands = &quot;setxkbmap -keycodes media&quot;; services.xserver.displayManager.sessionCommands = &quot;setxkbmap -keycodes media&quot;;
</programlisting> </programlisting>
<para> <para>
If you are manually starting the X server, you should set the If you are manually starting the X server, you should set the
argument <literal>-xkbdir /etc/X11/xkb</literal>, otherwise X argument <literal>-xkbdir /etc/X11/xkb</literal>, otherwise X
won't find your layout files. For example with wont find your layout files. For example with
<literal>xinit</literal> run <literal>xinit</literal> run
</para> </para>
<programlisting> <programlisting>

View File

@ -3,7 +3,7 @@
<para> <para>
To enable the Xfce Desktop Environment, set To enable the Xfce Desktop Environment, set
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.desktopManager.xfce.enable = true; services.xserver.desktopManager.xfce.enable = true;
services.xserver.displayManager.defaultSession = &quot;xfce&quot;; services.xserver.displayManager.defaultSession = &quot;xfce&quot;;
</programlisting> </programlisting>
@ -11,7 +11,7 @@ services.xserver.displayManager.defaultSession = &quot;xfce&quot;;
Optionally, <emphasis>picom</emphasis> can be enabled for nice Optionally, <emphasis>picom</emphasis> can be enabled for nice
graphical effects, some example settings: graphical effects, some example settings:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.picom = { services.picom = {
enable = true; enable = true;
fade = true; fade = true;
@ -36,8 +36,8 @@ services.picom = {
<xref linkend="opt-environment.systemPackages" />. <xref linkend="opt-environment.systemPackages" />.
</para> </para>
<para> <para>
If you'd like to add extra plugins to Thunar, add them to If youd like to add extra plugins to Thunar, add them to
<xref linkend="opt-programs.thunar.plugins" />. You shouldn't just <xref linkend="opt-programs.thunar.plugins" />. You shouldnt just
add them to <xref linkend="opt-environment.systemPackages" />. add them to <xref linkend="opt-environment.systemPackages" />.
</para> </para>
</section> </section>
@ -54,9 +54,10 @@ Thunar:2410): GVFS-RemoteVolumeMonitor-WARNING **: remote volume monitor with db
</programlisting> </programlisting>
<para> <para>
This is caused by some needed GNOME services not running. This is This is caused by some needed GNOME services not running. This is
all fixed by enabling &quot;Launch GNOME services on startup&quot; all fixed by enabling <quote>Launch GNOME services on
in the Advanced tab of the Session and Startup settings panel. startup</quote> in the Advanced tab of the Session and Startup
Alternatively, you can run this command to do the same thing. settings panel. Alternatively, you can run this command to do the
same thing.
</para> </para>
<programlisting> <programlisting>
$ xfconf-query -c xfce4-session -p /compat/LaunchGNOME -s true $ xfconf-query -c xfce4-session -p /compat/LaunchGNOME -s true

View File

@ -22,7 +22,7 @@
these dependencies into account and order the snippets accordingly. these dependencies into account and order the snippets accordingly.
As a simple example: As a simple example:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
system.activationScripts.my-activation-script = { system.activationScripts.my-activation-script = {
deps = [ &quot;etc&quot; ]; deps = [ &quot;etc&quot; ];
# supportsDryActivation = true; # supportsDryActivation = true;

View File

@ -18,7 +18,7 @@
<para> <para>
This is an example of using <literal>warnings</literal>. This is an example of using <literal>warnings</literal>.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, lib, ... }: { config, lib, ... }:
{ {
config = lib.mkIf config.services.foo.enable { config = lib.mkIf config.services.foo.enable {
@ -42,7 +42,7 @@
assertion is useful to prevent such a broken system from being assertion is useful to prevent such a broken system from being
built. built.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, lib, ... }: { config, lib, ... }:
{ {
config = lib.mkIf config.services.syslogd.enable { config = lib.mkIf config.services.syslogd.enable {

View File

@ -43,7 +43,7 @@
<literal>/etc/os-release</literal> in order to bake it into a <literal>/etc/os-release</literal> in order to bake it into a
unified kernel image: unified kernel image:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, lib, ... }: { { config, lib, ... }: {
boot.bootspec.extensions = { boot.bootspec.extensions = {
&quot;org.secureboot.osRelease&quot; = config.environment.etc.&quot;os-release&quot;.source; &quot;org.secureboot.osRelease&quot; = config.environment.etc.&quot;os-release&quot;.source;

View File

@ -30,7 +30,7 @@
type-checked <literal>settings</literal> attribute</link> for a more type-checked <literal>settings</literal> attribute</link> for a more
complete example. complete example.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ lib, config, ... }: { { lib, config, ... }: {
options.settings = lib.mkOption { options.settings = lib.mkOption {
@ -52,7 +52,7 @@
<para> <para>
And the following shows what such a module then allows And the following shows what such a module then allows
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
# Not a declared option, but the freeform type allows this # Not a declared option, but the freeform type allows this
settings.logLevel = &quot;debug&quot;; settings.logLevel = &quot;debug&quot;;
@ -72,7 +72,7 @@
Freeform attributes cannot depend on other attributes of the same Freeform attributes cannot depend on other attributes of the same
set without infinite recursion: set without infinite recursion:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
# This throws infinite recursion encountered # This throws infinite recursion encountered
settings.logLevel = lib.mkIf (config.settings.port == 80) &quot;debug&quot;; settings.logLevel = lib.mkIf (config.settings.port == 80) &quot;debug&quot;;

View File

@ -4,7 +4,7 @@
Sometimes NixOS modules need to be used in configuration but exist Sometimes NixOS modules need to be used in configuration but exist
outside of Nixpkgs. These modules can be imported: outside of Nixpkgs. These modules can be imported:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
@ -23,18 +23,18 @@
Nixpkgs NixOS modules. Like any NixOS module, this module can import Nixpkgs NixOS modules. Like any NixOS module, this module can import
additional modules: additional modules:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
# ./module-list/default.nix # ./module-list/default.nix
[ [
./example-module1 ./example-module1
./example-module2 ./example-module2
] ]
</programlisting> </programlisting>
<programlisting language="bash"> <programlisting language="nix">
# ./extra-module/default.nix # ./extra-module/default.nix
{ imports = import ./module-list.nix; } { imports = import ./module-list.nix; }
</programlisting> </programlisting>
<programlisting language="bash"> <programlisting language="nix">
# NIXOS_EXTRA_MODULE_PATH=/absolute/path/to/extra-module # NIXOS_EXTRA_MODULE_PATH=/absolute/path/to/extra-module
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:

View File

@ -15,7 +15,7 @@
Each of the meta-attributes must be defined at most once per module Each of the meta-attributes must be defined at most once per module
file. file.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
options = { options = {

View File

@ -6,7 +6,7 @@
hasnt been declared in any module. An option declaration generally hasnt been declared in any module. An option declaration generally
looks like this: looks like this:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
options = { options = {
name = mkOption { name = mkOption {
type = type specification; type = type specification;
@ -127,7 +127,7 @@ options = {
For example: For example:
</para> </para>
<anchor xml:id="ex-options-declarations-util-mkEnableOption-magic" /> <anchor xml:id="ex-options-declarations-util-mkEnableOption-magic" />
<programlisting language="bash"> <programlisting language="nix">
lib.mkEnableOption &quot;magic&quot; lib.mkEnableOption &quot;magic&quot;
# is like # is like
lib.mkOption { lib.mkOption {
@ -142,7 +142,7 @@ lib.mkOption {
<para> <para>
Usage: Usage:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
mkPackageOption pkgs &quot;name&quot; { default = [ &quot;path&quot; &quot;in&quot; &quot;pkgs&quot; ]; example = &quot;literal example&quot;; } mkPackageOption pkgs &quot;name&quot; { default = [ &quot;path&quot; &quot;in&quot; &quot;pkgs&quot; ]; example = &quot;literal example&quot;; }
</programlisting> </programlisting>
<para> <para>
@ -177,7 +177,7 @@ mkPackageOption pkgs &quot;name&quot; { default = [ &quot;path&quot; &quot;in&qu
Examples: Examples:
</para> </para>
<anchor xml:id="ex-options-declarations-util-mkPackageOption-hello" /> <anchor xml:id="ex-options-declarations-util-mkPackageOption-hello" />
<programlisting language="bash"> <programlisting language="nix">
lib.mkPackageOption pkgs &quot;hello&quot; { } lib.mkPackageOption pkgs &quot;hello&quot; { }
# is like # is like
lib.mkOption { lib.mkOption {
@ -188,7 +188,7 @@ lib.mkOption {
} }
</programlisting> </programlisting>
<anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" /> <anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" />
<programlisting language="bash"> <programlisting language="nix">
lib.mkPackageOption pkgs &quot;GHC&quot; { lib.mkPackageOption pkgs &quot;GHC&quot; {
default = [ &quot;ghc&quot; ]; default = [ &quot;ghc&quot; ];
example = &quot;pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;; example = &quot;pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
@ -222,7 +222,7 @@ lib.mkOption {
As an example, we will take the case of display managers. As an example, we will take the case of display managers.
There is a central display manager module for generic There is a central display manager module for generic
display manager options and a module file per display display manager options and a module file per display
manager backend (sddm, gdm ...). manager backend (sddm, gdm ).
</para> </para>
<para> <para>
There are two approaches we could take with this module There are two approaches we could take with this module
@ -287,7 +287,7 @@ lib.mkOption {
<emphasis role="strong">Example: Extensible type placeholder <emphasis role="strong">Example: Extensible type placeholder
in the service module</emphasis> in the service module</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.displayManager.enable = mkOption { services.xserver.displayManager.enable = mkOption {
description = &quot;Display manager to use&quot;; description = &quot;Display manager to use&quot;;
type = with types; nullOr (enum [ ]); type = with types; nullOr (enum [ ]);
@ -299,7 +299,7 @@ services.xserver.displayManager.enable = mkOption {
<literal>services.xserver.displayManager.enable</literal> in <literal>services.xserver.displayManager.enable</literal> in
the <literal>gdm</literal> module</emphasis> the <literal>gdm</literal> module</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.displayManager.enable = mkOption { services.xserver.displayManager.enable = mkOption {
type = with types; nullOr (enum [ &quot;gdm&quot; ]); type = with types; nullOr (enum [ &quot;gdm&quot; ]);
}; };
@ -310,7 +310,7 @@ services.xserver.displayManager.enable = mkOption {
<literal>services.xserver.displayManager.enable</literal> in <literal>services.xserver.displayManager.enable</literal> in
the <literal>sddm</literal> module</emphasis> the <literal>sddm</literal> module</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.xserver.displayManager.enable = mkOption { services.xserver.displayManager.enable = mkOption {
type = with types; nullOr (enum [ &quot;sddm&quot; ]); type = with types; nullOr (enum [ &quot;sddm&quot; ]);
}; };

View File

@ -4,7 +4,7 @@
Option definitions are generally straight-forward bindings of values Option definitions are generally straight-forward bindings of values
to option names, like to option names, like
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
config = { config = {
services.httpd.enable = true; services.httpd.enable = true;
}; };
@ -21,7 +21,7 @@ config = {
another option, you may need to use <literal>mkIf</literal>. another option, you may need to use <literal>mkIf</literal>.
Consider, for instance: Consider, for instance:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
config = if config.services.httpd.enable then { config = if config.services.httpd.enable then {
environment.systemPackages = [ ... ]; environment.systemPackages = [ ... ];
... ...
@ -34,7 +34,7 @@ config = if config.services.httpd.enable then {
value being constructed here. After all, you could also write the value being constructed here. After all, you could also write the
clearly circular and contradictory: clearly circular and contradictory:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
config = if config.services.httpd.enable then { config = if config.services.httpd.enable then {
services.httpd.enable = false; services.httpd.enable = false;
} else { } else {
@ -44,7 +44,7 @@ config = if config.services.httpd.enable then {
<para> <para>
The solution is to write: The solution is to write:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
config = mkIf config.services.httpd.enable { config = mkIf config.services.httpd.enable {
environment.systemPackages = [ ... ]; environment.systemPackages = [ ... ];
... ...
@ -55,7 +55,7 @@ config = mkIf config.services.httpd.enable {
of the conditional to be <quote>pushed down</quote> into the of the conditional to be <quote>pushed down</quote> into the
individual definitions, as if you had written: individual definitions, as if you had written:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
config = { config = {
environment.systemPackages = if config.services.httpd.enable then [ ... ] else []; environment.systemPackages = if config.services.httpd.enable then [ ... ] else [];
... ...
@ -72,7 +72,7 @@ config = {
option defaults have priority 1500. You can specify an explicit option defaults have priority 1500. You can specify an explicit
priority by using <literal>mkOverride</literal>, e.g. priority by using <literal>mkOverride</literal>, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.openssh.enable = mkOverride 10 false; services.openssh.enable = mkOverride 10 false;
</programlisting> </programlisting>
<para> <para>
@ -94,7 +94,7 @@ services.openssh.enable = mkOverride 10 false;
<literal>mkOrder 500</literal> and <literal>mkOrder 500</literal> and
<literal>mkOrder 1500</literal>, respectively. As an example, <literal>mkOrder 1500</literal>, respectively. As an example,
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
hardware.firmware = mkBefore [ myFirmware ]; hardware.firmware = mkBefore [ myFirmware ];
</programlisting> </programlisting>
<para> <para>
@ -117,7 +117,7 @@ hardware.firmware = mkBefore [ myFirmware ];
to be merged together as if they were declared in separate to be merged together as if they were declared in separate
modules. This can be done using <literal>mkMerge</literal>: modules. This can be done using <literal>mkMerge</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
config = mkMerge config = mkMerge
[ # Unconditional stuff. [ # Unconditional stuff.
{ environment.systemPackages = [ ... ]; { environment.systemPackages = [ ... ];

View File

@ -81,14 +81,14 @@
<para> <para>
Two definitions of this type like Two definitions of this type like
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
str = lib.mkDefault &quot;foo&quot;; str = lib.mkDefault &quot;foo&quot;;
pkg.hello = pkgs.hello; pkg.hello = pkgs.hello;
fun.fun = x: x + 1; fun.fun = x: x + 1;
} }
</programlisting> </programlisting>
<programlisting language="bash"> <programlisting language="nix">
{ {
str = lib.mkIf true &quot;bar&quot;; str = lib.mkIf true &quot;bar&quot;;
pkg.gcc = pkgs.gcc; pkg.gcc = pkgs.gcc;
@ -98,7 +98,7 @@
<para> <para>
will get merged to will get merged to
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
str = &quot;bar&quot;; str = &quot;bar&quot;;
pkg.gcc = pkgs.gcc; pkg.gcc = pkgs.gcc;
@ -152,13 +152,13 @@
<warning> <warning>
<para> <para>
This type will be deprecated in the future because it This type will be deprecated in the future because it
doesn't recurse into attribute sets, silently drops doesnt recurse into attribute sets, silently drops
earlier attribute definitions, and doesn't discharge earlier attribute definitions, and doesnt discharge
<literal>lib.mkDefault</literal>, <literal>lib.mkDefault</literal>,
<literal>lib.mkIf</literal> and co. For allowing arbitrary <literal>lib.mkIf</literal> and co. For allowing arbitrary
attribute sets, prefer attribute sets, prefer
<literal>types.attrsOf types.anything</literal> instead <literal>types.attrsOf types.anything</literal> instead
which doesn't have these problems. which doesnt have these problems.
</para> </para>
</warning> </warning>
</listitem> </listitem>
@ -453,7 +453,7 @@
<literal>_module.args</literal> should be used instead <literal>_module.args</literal> should be used instead
for most arguments since it allows overriding. for most arguments since it allows overriding.
<emphasis><literal>specialArgs</literal></emphasis> <emphasis><literal>specialArgs</literal></emphasis>
should only be used for arguments that can't go through should only be used for arguments that cant go through
the module fixed-point, because of infinite recursion or the module fixed-point, because of infinite recursion or
other problems. An example is overriding the other problems. An example is overriding the
<literal>lib</literal> argument, because <literal>lib</literal> argument, because
@ -477,7 +477,7 @@
instead of requiring instead of requiring
<literal>the-submodule.config.config = &quot;value&quot;</literal>. <literal>the-submodule.config.config = &quot;value&quot;</literal>.
This is because only when modules This is because only when modules
<emphasis>don't</emphasis> set the <emphasis>dont</emphasis> set the
<literal>config</literal> or <literal>options</literal> <literal>config</literal> or <literal>options</literal>
keys, all keys are interpreted as option definitions in keys, all keys are interpreted as option definitions in
the <literal>config</literal> section. Enabling this the <literal>config</literal> section. Enabling this
@ -668,7 +668,7 @@
<varlistentry> <varlistentry>
<term> <term>
<literal>types.oneOf</literal> [ <literal>types.oneOf</literal> [
<emphasis><literal>t1 t2</literal></emphasis> ... ] <emphasis><literal>t1 t2</literal></emphasis> ]
</term> </term>
<listitem> <listitem>
<para> <para>
@ -732,7 +732,7 @@
<emphasis role="strong">Example: Directly defined <emphasis role="strong">Example: Directly defined
submodule</emphasis> submodule</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
options.mod = mkOption { options.mod = mkOption {
description = &quot;submodule example&quot;; description = &quot;submodule example&quot;;
type = with types; submodule { type = with types; submodule {
@ -752,7 +752,7 @@ options.mod = mkOption {
<emphasis role="strong">Example: Submodule defined as a <emphasis role="strong">Example: Submodule defined as a
reference</emphasis> reference</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
let let
modOptions = { modOptions = {
options = { options = {
@ -787,7 +787,7 @@ options.mod = mkOption {
<emphasis role="strong">Example: Declaration of a list of <emphasis role="strong">Example: Declaration of a list of
submodules</emphasis> submodules</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
options.mod = mkOption { options.mod = mkOption {
description = &quot;submodule example&quot;; description = &quot;submodule example&quot;;
type = with types; listOf (submodule { type = with types; listOf (submodule {
@ -807,7 +807,7 @@ options.mod = mkOption {
<emphasis role="strong">Example: Definition of a list of <emphasis role="strong">Example: Definition of a list of
submodules</emphasis> submodules</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
config.mod = [ config.mod = [
{ foo = 1; bar = &quot;one&quot;; } { foo = 1; bar = &quot;one&quot;; }
{ foo = 2; bar = &quot;two&quot;; } { foo = 2; bar = &quot;two&quot;; }
@ -827,7 +827,7 @@ config.mod = [
<emphasis role="strong">Example: Declaration of attribute sets of <emphasis role="strong">Example: Declaration of attribute sets of
submodules</emphasis> submodules</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
options.mod = mkOption { options.mod = mkOption {
description = &quot;submodule example&quot;; description = &quot;submodule example&quot;;
type = with types; attrsOf (submodule { type = with types; attrsOf (submodule {
@ -847,7 +847,7 @@ options.mod = mkOption {
<emphasis role="strong">Example: Definition of attribute sets of <emphasis role="strong">Example: Definition of attribute sets of
submodules</emphasis> submodules</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
config.mod.one = { foo = 1; bar = &quot;one&quot;; }; config.mod.one = { foo = 1; bar = &quot;one&quot;; };
config.mod.two = { foo = 2; bar = &quot;two&quot;; }; config.mod.two = { foo = 2; bar = &quot;two&quot;; };
</programlisting> </programlisting>
@ -878,7 +878,7 @@ config.mod.two = { foo = 2; bar = &quot;two&quot;; };
<emphasis role="strong">Example: Adding a type <emphasis role="strong">Example: Adding a type
check</emphasis> check</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
byte = mkOption { byte = mkOption {
description = &quot;An integer between 0 and 255.&quot;; description = &quot;An integer between 0 and 255.&quot;;
type = types.addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255); type = types.addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255);
@ -889,7 +889,7 @@ byte = mkOption {
<emphasis role="strong">Example: Overriding a type <emphasis role="strong">Example: Overriding a type
check</emphasis> check</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
nixThings = mkOption { nixThings = mkOption {
description = &quot;words that start with 'nix'&quot;; description = &quot;words that start with 'nix'&quot;;
type = types.str // { type = types.str // {

View File

@ -3,8 +3,8 @@
<para> <para>
Modules that are imported can also be disabled. The option Modules that are imported can also be disabled. The option
declarations, config implementation and the imports of a disabled declarations, config implementation and the imports of a disabled
module will be ignored, allowing another to take it's place. This module will be ignored, allowing another to take its place. This can
can be used to import a set of modules from another channel while be used to import a set of modules from another channel while
keeping the rest of the system on a stable release. keeping the rest of the system on a stable release.
</para> </para>
<para> <para>
@ -19,10 +19,10 @@
This example will replace the existing postgresql module with the This example will replace the existing postgresql module with the
version defined in the nixos-unstable channel while keeping the rest version defined in the nixos-unstable channel while keeping the rest
of the modules and packages from the original nixos channel. This of the modules and packages from the original nixos channel. This
only overrides the module definition, this won't use postgresql from only overrides the module definition, this wont use postgresql from
nixos-unstable unless explicitly configured to do so. nixos-unstable unless explicitly configured to do so.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
@ -40,9 +40,9 @@
<para> <para>
This example shows how to define a custom module as a replacement This example shows how to define a custom module as a replacement
for an existing module. Importing this module will disable the for an existing module. Importing this module will disable the
original module without having to know it's implementation details. original module without having to know its implementation details.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;

View File

@ -19,10 +19,10 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Non-nix-representable ones: These can't be trivially mapped to a Non-nix-representable ones: These cant be trivially mapped to a
subset of Nix syntax. Most generic programming languages are in subset of Nix syntax. Most generic programming languages are in
this group, e.g. bash, since the statement this group, e.g. bash, since the statement
<literal>if true; then echo hi; fi</literal> doesn't have a <literal>if true; then echo hi; fi</literal> doesnt have a
trivial representation in Nix. trivial representation in Nix.
</para> </para>
<para> <para>
@ -42,8 +42,7 @@
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<section xml:id="sec-settings-nix-representable"> <section xml:id="sec-settings-nix-representable">
<title>Nix-representable Formats (JSON, YAML, TOML, INI, <title>Nix-representable Formats (JSON, YAML, TOML, INI, …)</title>
...)</title>
<para> <para>
By convention, formats like this are handled with a generic By convention, formats like this are handled with a generic
<literal>settings</literal> option, representing the full program <literal>settings</literal> option, representing the full program
@ -318,7 +317,7 @@
used, along with some other related best practices. See the used, along with some other related best practices. See the
comments for explanations. comments for explanations.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ options, config, lib, pkgs, ... }: { options, config, lib, pkgs, ... }:
let let
cfg = config.services.foo; cfg = config.services.foo;
@ -391,7 +390,7 @@ in {
<emphasis role="strong">Example: Declaring a type-checked <emphasis role="strong">Example: Declaring a type-checked
<literal>settings</literal> attribute</emphasis> <literal>settings</literal> attribute</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
settings = lib.mkOption { settings = lib.mkOption {
type = lib.types.submodule { type = lib.types.submodule {

View File

@ -23,7 +23,7 @@ $ nix-shell
nix-shell$ make nix-shell$ make
</programlisting> </programlisting>
<para> <para>
Once you are done making modifications to the manual, it's Once you are done making modifications to the manual, its
important to build it before committing. You can do that as important to build it before committing. You can do that as
follows: follows:
</para> </para>

View File

@ -32,7 +32,7 @@
In <xref linkend="sec-configuration-syntax" />, we saw the following In <xref linkend="sec-configuration-syntax" />, we saw the following
structure of NixOS modules: structure of NixOS modules:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
{ option definitions { option definitions
@ -50,7 +50,7 @@
<emphasis role="strong">Example: Structure of NixOS <emphasis role="strong">Example: Structure of NixOS
Modules</emphasis> Modules</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
@ -90,7 +90,7 @@
This <literal>imports</literal> list enumerates the paths to This <literal>imports</literal> list enumerates the paths to
other NixOS modules that should be included in the evaluation of other NixOS modules that should be included in the evaluation of
the system configuration. A default set of modules is defined in the system configuration. A default set of modules is defined in
the file <literal>modules/module-list.nix</literal>. These don't the file <literal>modules/module-list.nix</literal>. These dont
need to be added in the import list. need to be added in the import list.
</para> </para>
</listitem> </listitem>
@ -146,7 +146,7 @@
<emphasis role="strong">Example: NixOS Module for the <emphasis role="strong">Example: NixOS Module for the
<quote>locate</quote> Service</emphasis> <quote>locate</quote> Service</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
@ -208,7 +208,7 @@ in {
<emphasis role="strong">Example: Escaping in Exec <emphasis role="strong">Example: Escaping in Exec
directives</emphasis> directives</emphasis>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, lib, pkgs, utils, ... }: { config, lib, pkgs, utils, ... }:
with lib; with lib;

View File

@ -3,7 +3,7 @@
<para> <para>
A NixOS test is a module that has the following structure: A NixOS test is a module that has the following structure:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
# One or more machines: # One or more machines:
@ -58,14 +58,14 @@
Tests that are part of NixOS are added to Tests that are part of NixOS are added to
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/all-tests.nix"><literal>nixos/tests/all-tests.nix</literal></link>. <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/all-tests.nix"><literal>nixos/tests/all-tests.nix</literal></link>.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
hostname = runTest ./hostname.nix; hostname = runTest ./hostname.nix;
</programlisting> </programlisting>
<para> <para>
Overrides can be added by defining an anonymous module in Overrides can be added by defining an anonymous module in
<literal>all-tests.nix</literal>. <literal>all-tests.nix</literal>.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
hostname = runTest { hostname = runTest {
imports = [ ./hostname.nix ]; imports = [ ./hostname.nix ];
defaults.networking.firewall.enable = false; defaults.networking.firewall.enable = false;
@ -87,7 +87,7 @@ nix-build -A nixosTests.hostname
Outside the <literal>nixpkgs</literal> repository, you can Outside the <literal>nixpkgs</literal> repository, you can
instantiate the test by first importing the NixOS library, instantiate the test by first importing the NixOS library,
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
let nixos-lib = import (nixpkgs + &quot;/nixos/lib&quot;) { }; let nixos-lib = import (nixpkgs + &quot;/nixos/lib&quot;) { };
in in
@ -255,7 +255,7 @@ start_all()
<listitem> <listitem>
<para> <para>
Return a list of different interpretations of what is Return a list of different interpretations of what is
currently visible on the machine's screen using optical currently visible on the machines screen using optical
character recognition. The number and order of the character recognition. The number and order of the
interpretations is not specified and is subject to change, interpretations is not specified and is subject to change,
but if no exception is raised at least one will be returned. but if no exception is raised at least one will be returned.
@ -276,7 +276,7 @@ start_all()
<listitem> <listitem>
<para> <para>
Return a textual representation of what is currently visible Return a textual representation of what is currently visible
on the machine's screen using optical character recognition. on the machines screen using optical character recognition.
</para> </para>
<note> <note>
<para> <para>
@ -630,10 +630,10 @@ machine.wait_for_unit(&quot;xautolock.service&quot;, &quot;x-session-user&quot;)
<literal>stop_job</literal>. <literal>stop_job</literal>.
</para> </para>
<para> <para>
For faster dev cycles it's also possible to disable the For faster dev cycles its also possible to disable the
code-linters (this shouldn't be committed though): code-linters (this shouldnt be committed though):
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
skipLint = true; skipLint = true;
nodes.machine = nodes.machine =
@ -650,10 +650,10 @@ machine.wait_for_unit(&quot;xautolock.service&quot;, &quot;x-session-user&quot;)
<para> <para>
This will produce a Nix warning at evaluation time. To fully This will produce a Nix warning at evaluation time. To fully
disable the linter, wrap the test script in comment directives to disable the linter, wrap the test script in comment directives to
disable the Black linter directly (again, don't commit this within disable the Black linter directly (again, dont commit this within
the Nixpkgs repository): the Nixpkgs repository):
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
testScript = testScript =
'' ''
# fmt: off # fmt: off
@ -665,7 +665,7 @@ machine.wait_for_unit(&quot;xautolock.service&quot;, &quot;x-session-user&quot;)
Similarly, the type checking of test scripts can be disabled in Similarly, the type checking of test scripts can be disabled in
the following way: the following way:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
skipTypeCheck = true; skipTypeCheck = true;
nodes.machine = nodes.machine =
@ -700,25 +700,37 @@ with foo_running:
<literal>polling_condition</literal> takes the following <literal>polling_condition</literal> takes the following
(optional) arguments: (optional) arguments:
</para> </para>
<para> <variablelist>
<literal>seconds_interval</literal> <varlistentry>
</para> <term>
<para> <literal>seconds_interval</literal>
: specifies how often the condition should be polled: </term>
</para> <listitem>
<para>
specifies how often the condition should be polled:
</para>
</listitem>
</varlistentry>
</variablelist>
<programlisting language="python"> <programlisting language="python">
@polling_condition(seconds_interval=10) @polling_condition(seconds_interval=10)
def foo_running(): def foo_running():
machine.succeed(&quot;pgrep -x foo&quot;) machine.succeed(&quot;pgrep -x foo&quot;)
</programlisting> </programlisting>
<para> <variablelist>
<literal>description</literal> <varlistentry>
</para> <term>
<para> <literal>description</literal>
: is used in the log when the condition is checked. If this is not </term>
provided, the description is pulled from the docstring of the <listitem>
function. These two are therefore equivalent: <para>
</para> is used in the log when the condition is checked. If this is
not provided, the description is pulled from the docstring
of the function. These two are therefore equivalent:
</para>
</listitem>
</varlistentry>
</variablelist>
<programlisting language="python"> <programlisting language="python">
@polling_condition @polling_condition
def foo_running(): def foo_running():
@ -739,7 +751,7 @@ def foo_running():
<literal>extraPythonPackages</literal>. For example, you could add <literal>extraPythonPackages</literal>. For example, you could add
<literal>numpy</literal> like this: <literal>numpy</literal> like this:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
extraPythonPackages = p: [ p.numpy ]; extraPythonPackages = p: [ p.numpy ];

View File

@ -62,7 +62,7 @@ $ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd
can create the following file at can create the following file at
<literal>modules/installer/cd-dvd/installation-cd-graphical-gnome-macbook.nix</literal>: <literal>modules/installer/cd-dvd/installation-cd-graphical-gnome-macbook.nix</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, ... }: { config, ... }:
{ {

View File

@ -16,7 +16,7 @@
</para> </para>
<warning> <warning>
<para> <para>
This command doesn't start/stop This command doesnt start/stop
<link linkend="opt-systemd.user.services">user services</link> <link linkend="opt-systemd.user.services">user services</link>
automatically. <literal>nixos-rebuild</literal> only runs a automatically. <literal>nixos-rebuild</literal> only runs a
<literal>daemon-reload</literal> for each user with running user <literal>daemon-reload</literal> for each user with running user
@ -64,8 +64,8 @@
<para> <para>
which causes the new configuration (and previous ones created using which causes the new configuration (and previous ones created using
<literal>-p test</literal>) to show up in the GRUB submenu <literal>-p test</literal>) to show up in the GRUB submenu
<quote>NixOS - Profile 'test'</quote>. This can be useful to <quote>NixOS - Profile <quote>test</quote></quote>. This can be
separate test configurations from <quote>stable</quote> useful to separate test configurations from <quote>stable</quote>
configurations. configurations.
</para> </para>
<para> <para>
@ -94,7 +94,7 @@ $ ./result/bin/run-*-vm
unless you have set <literal>mutableUsers = false</literal>. Another unless you have set <literal>mutableUsers = false</literal>. Another
way is to temporarily add the following to your configuration: way is to temporarily add the following to your configuration:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
users.users.your-user.initialHashedPassword = &quot;test&quot;; users.users.your-user.initialHashedPassword = &quot;test&quot;;
</programlisting> </programlisting>
<para> <para>

View File

@ -11,7 +11,7 @@
<literal>/mnt/etc/nixos/configuration.nix</literal> to keep the <literal>/mnt/etc/nixos/configuration.nix</literal> to keep the
internet accessible after reboot. internet accessible after reboot.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
networking.proxy.default = &quot;http://user:password@proxy:port/&quot;; networking.proxy.default = &quot;http://user:password@proxy:port/&quot;;
networking.proxy.noProxy = &quot;127.0.0.1,localhost,internal.domain&quot;; networking.proxy.noProxy = &quot;127.0.0.1,localhost,internal.domain&quot;;
</programlisting> </programlisting>

View File

@ -53,7 +53,7 @@ $ . $HOME/.nix-profile/etc/profile.d/nix.sh # …or open a fresh shell
Switch to the NixOS channel: Switch to the NixOS channel:
</para> </para>
<para> <para>
If you've just installed Nix on a non-NixOS distribution, you If youve just installed Nix on a non-NixOS distribution, you
will be on the <literal>nixpkgs</literal> channel by default. will be on the <literal>nixpkgs</literal> channel by default.
</para> </para>
<programlisting> <programlisting>
@ -78,11 +78,11 @@ $ nix-channel --add https://nixos.org/channels/nixos-version nixpkgs
Install the NixOS installation tools: Install the NixOS installation tools:
</para> </para>
<para> <para>
You'll need <literal>nixos-generate-config</literal> and Youll need <literal>nixos-generate-config</literal> and
<literal>nixos-install</literal>, but this also makes some man <literal>nixos-install</literal>, but this also makes some man
pages and <literal>nixos-enter</literal> available, just in case pages and <literal>nixos-enter</literal> available, just in case
you want to chroot into your NixOS partition. NixOS installs you want to chroot into your NixOS partition. NixOS installs
these by default, but you don't have NixOS yet.. these by default, but you dont have NixOS yet..
</para> </para>
<programlisting> <programlisting>
$ nix-env -f '&lt;nixpkgs&gt;' -iA nixos-install-tools $ nix-env -f '&lt;nixpkgs&gt;' -iA nixos-install-tools
@ -105,7 +105,7 @@ $ nix-env -f '&lt;nixpkgs&gt;' -iA nixos-install-tools
mounting steps of <xref linkend="sec-installation" /> mounting steps of <xref linkend="sec-installation" />
</para> </para>
<para> <para>
If you're about to install NixOS in place using If youre about to install NixOS in place using
<literal>NIXOS_LUSTRATE</literal> there is nothing to do for <literal>NIXOS_LUSTRATE</literal> there is nothing to do for
this step. this step.
</para> </para>
@ -118,18 +118,18 @@ $ nix-env -f '&lt;nixpkgs&gt;' -iA nixos-install-tools
$ sudo `which nixos-generate-config` --root /mnt $ sudo `which nixos-generate-config` --root /mnt
</programlisting> </programlisting>
<para> <para>
You'll probably want to edit the configuration files. Refer to Youll probably want to edit the configuration files. Refer to
the <literal>nixos-generate-config</literal> step in the <literal>nixos-generate-config</literal> step in
<xref linkend="sec-installation" /> for more information. <xref linkend="sec-installation" /> for more information.
</para> </para>
<para> <para>
Consider setting up the NixOS bootloader to give you the ability Consider setting up the NixOS bootloader to give you the ability
to boot on your existing Linux partition. For instance, if to boot on your existing Linux partition. For instance, if
you're using GRUB and your existing distribution is running youre using GRUB and your existing distribution is running
Ubuntu, you may want to add something like this to your Ubuntu, you may want to add something like this to your
<literal>configuration.nix</literal>: <literal>configuration.nix</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.loader.grub.extraEntries = '' boot.loader.grub.extraEntries = ''
menuentry &quot;Ubuntu&quot; { menuentry &quot;Ubuntu&quot; {
search --set=ubuntu --fs-uuid 3cc3e652-0c1f-4800-8451-033754f68e6e search --set=ubuntu --fs-uuid 3cc3e652-0c1f-4800-8451-033754f68e6e
@ -215,21 +215,21 @@ $ sudo `which nixos-generate-config`
</programlisting> </programlisting>
<para> <para>
Note that this will place the generated configuration files in Note that this will place the generated configuration files in
<literal>/etc/nixos</literal>. You'll probably want to edit the <literal>/etc/nixos</literal>. Youll probably want to edit the
configuration files. Refer to the configuration files. Refer to the
<literal>nixos-generate-config</literal> step in <literal>nixos-generate-config</literal> step in
<xref linkend="sec-installation" /> for more information. <xref linkend="sec-installation" /> for more information.
</para> </para>
<para> <para>
You'll likely want to set a root password for your first boot Youll likely want to set a root password for your first boot
using the configuration files because you won't have a chance to using the configuration files because you wont have a chance to
enter a password until after you reboot. You can initialize the enter a password until after you reboot. You can initialize the
root password to an empty one with this line: (and of course root password to an empty one with this line: (and of course
don't forget to set one once you've rebooted or to lock the dont forget to set one once youve rebooted or to lock the
account with <literal>sudo passwd -l root</literal> if you use account with <literal>sudo passwd -l root</literal> if you use
<literal>sudo</literal>) <literal>sudo</literal>)
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
users.users.root.initialHashedPassword = &quot;&quot;; users.users.root.initialHashedPassword = &quot;&quot;;
</programlisting> </programlisting>
</listitem> </listitem>
@ -262,7 +262,7 @@ $ sudo chown -R 0:0 /nix
</para> </para>
<para> <para>
<literal>/etc/NIXOS_LUSTRATE</literal> tells the NixOS bootup <literal>/etc/NIXOS_LUSTRATE</literal> tells the NixOS bootup
scripts to move <emphasis>everything</emphasis> that's in the scripts to move <emphasis>everything</emphasis> thats in the
root partition to <literal>/old-root</literal>. This will move root partition to <literal>/old-root</literal>. This will move
your existing distribution out of the way in the very early your existing distribution out of the way in the very early
stages of the NixOS bootup. There are exceptions (we do need to stages of the NixOS bootup. There are exceptions (we do need to
@ -290,12 +290,12 @@ $ sudo chown -R 0:0 /nix
<note> <note>
<para> <para>
Support for <literal>NIXOS_LUSTRATE</literal> was added in Support for <literal>NIXOS_LUSTRATE</literal> was added in
NixOS 16.09. The act of &quot;lustrating&quot; refers to the NixOS 16.09. The act of <quote>lustrating</quote> refers to
wiping of the existing distribution. Creating the wiping of the existing distribution. Creating
<literal>/etc/NIXOS_LUSTRATE</literal> can also be used on <literal>/etc/NIXOS_LUSTRATE</literal> can also be used on
NixOS to remove all mutable files from your root partition NixOS to remove all mutable files from your root partition
(anything that's not in <literal>/nix</literal> or (anything thats not in <literal>/nix</literal> or
<literal>/boot</literal> gets &quot;lustrated&quot; on the <literal>/boot</literal> gets <quote>lustrated</quote> on the
next boot. next boot.
</para> </para>
<para> <para>
@ -307,14 +307,14 @@ $ sudo chown -R 0:0 /nix
</para> </para>
</note> </note>
<para> <para>
Let's create the files: Lets create the files:
</para> </para>
<programlisting> <programlisting>
$ sudo touch /etc/NIXOS $ sudo touch /etc/NIXOS
$ sudo touch /etc/NIXOS_LUSTRATE $ sudo touch /etc/NIXOS_LUSTRATE
</programlisting> </programlisting>
<para> <para>
Let's also make sure the NixOS configuration files are kept once Lets also make sure the NixOS configuration files are kept once
we reboot on NixOS: we reboot on NixOS:
</para> </para>
<programlisting> <programlisting>
@ -331,7 +331,7 @@ $ echo etc/nixos | sudo tee -a /etc/NIXOS_LUSTRATE
<warning> <warning>
<para> <para>
Once you complete this step, your current distribution will no Once you complete this step, your current distribution will no
longer be bootable! If you didn't get all the NixOS longer be bootable! If you didnt get all the NixOS
configuration right, especially those settings pertaining to configuration right, especially those settings pertaining to
boot loading and root partition, NixOS may not be bootable boot loading and root partition, NixOS may not be bootable
either. Have a USB rescue device ready in case this happens. either. Have a USB rescue device ready in case this happens.
@ -349,7 +349,7 @@ sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot
<listitem> <listitem>
<para> <para>
If for some reason you want to revert to the old distribution, If for some reason you want to revert to the old distribution,
you'll need to boot on a USB rescue disk and do something along youll need to boot on a USB rescue disk and do something along
these lines: these lines:
</para> </para>
<programlisting> <programlisting>
@ -367,7 +367,7 @@ sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot
loader. loader.
</para> </para>
<para> <para>
And of course, if you're happy with NixOS and no longer need the And of course, if youre happy with NixOS and no longer need the
old distribution: old distribution:
</para> </para>
<programlisting> <programlisting>
@ -376,7 +376,7 @@ sudo rm -rf /old-root
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
It's also worth noting that this whole process can be automated. Its also worth noting that this whole process can be automated.
This is especially useful for Cloud VMs, where provider do not This is especially useful for Cloud VMs, where provider do not
provide NixOS. For instance, provide NixOS. For instance,
<link xlink:href="https://github.com/elitak/nixos-infect">nixos-infect</link> <link xlink:href="https://github.com/elitak/nixos-infect">nixos-infect</link>

View File

@ -54,7 +54,7 @@ nix-build -A kexec.x86_64-linux '&lt;nixpkgs/nixos/release.nix&gt;'
running Linux Distribution. running Linux Distribution.
</para> </para>
<para> <para>
Note its symlinks pointing elsewhere, so <literal>cd</literal> in, Note its symlinks pointing elsewhere, so <literal>cd</literal> in,
and use <literal>scp * root@$destination</literal> to copy it over, and use <literal>scp * root@$destination</literal> to copy it over,
rather than rsync. rather than rsync.
</para> </para>
@ -69,7 +69,7 @@ nix-build -A kexec.x86_64-linux '&lt;nixpkgs/nixos/release.nix&gt;'
instead of the default installer image, you can build your own instead of the default installer image, you can build your own
<literal>configuration.nix</literal>: <literal>configuration.nix</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ modulesPath, ... }: { { modulesPath, ... }: {
imports = [ imports = [
(modulesPath + &quot;/installer/netboot/netboot-minimal.nix&quot;) (modulesPath + &quot;/installer/netboot/netboot-minimal.nix&quot;)

View File

@ -110,15 +110,15 @@ diskutil unmountDisk diskX
sudo dd if=&lt;path-to-image&gt; of=/dev/rdiskX bs=4m sudo dd if=&lt;path-to-image&gt; of=/dev/rdiskX bs=4m
</programlisting> </programlisting>
<para> <para>
After <literal>dd</literal> completes, a GUI dialog &quot;The disk After <literal>dd</literal> completes, a GUI dialog <quote>The
you inserted was not readable by this computer&quot; will pop up, disk you inserted was not readable by this computer</quote> will
which can be ignored. pop up, which can be ignored.
</para> </para>
<note> <note>
<para> <para>
Using the 'raw' <literal>rdiskX</literal> device instead of Using the <quote>raw</quote> <literal>rdiskX</literal> device
<literal>diskX</literal> with dd completes in minutes instead of instead of <literal>diskX</literal> with dd completes in minutes
hours. instead of hours.
</para> </para>
</note> </note>
<orderedlist numeration="arabic" spacing="compact"> <orderedlist numeration="arabic" spacing="compact">

View File

@ -11,8 +11,8 @@
<orderedlist numeration="arabic"> <orderedlist numeration="arabic">
<listitem> <listitem>
<para> <para>
Add a New Machine in VirtualBox with OS Type &quot;Linux / Other Add a New Machine in VirtualBox with OS Type <quote>Linux /
Linux&quot; Other Linux</quote>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -38,7 +38,7 @@
<listitem> <listitem>
<para> <para>
Click on Settings / System / Acceleration and enable Click on Settings / System / Acceleration and enable
&quot;VT-x/AMD-V&quot; acceleration <quote>VT-x/AMD-V</quote> acceleration
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -58,25 +58,25 @@
There are a few modifications you should make in configuration.nix. There are a few modifications you should make in configuration.nix.
Enable booting: Enable booting:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.loader.grub.device = &quot;/dev/sda&quot;; boot.loader.grub.device = &quot;/dev/sda&quot;;
</programlisting> </programlisting>
<para> <para>
Also remove the fsck that runs at startup. It will always fail to Also remove the fsck that runs at startup. It will always fail to
run, stopping your boot until you press <literal>*</literal>. run, stopping your boot until you press <literal>*</literal>.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
boot.initrd.checkJournalingFS = false; boot.initrd.checkJournalingFS = false;
</programlisting> </programlisting>
<para> <para>
Shared folders can be given a name and a path in the host system in Shared folders can be given a name and a path in the host system in
the VirtualBox settings (Machine / Settings / Shared Folders, then the VirtualBox settings (Machine / Settings / Shared Folders, then
click on the &quot;Add&quot; icon). Add the following to the click on the <quote>Add</quote> icon). Add the following to the
<literal>/etc/nixos/configuration.nix</literal> to auto-mount them. <literal>/etc/nixos/configuration.nix</literal> to auto-mount them.
If you do not add <literal>&quot;nofail&quot;</literal>, the system If you do not add <literal>&quot;nofail&quot;</literal>, the system
will not boot properly. will not boot properly.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ...} : { config, pkgs, ...} :
{ {
fileSystems.&quot;/virtualboxshare&quot; = { fileSystems.&quot;/virtualboxshare&quot; = {

View File

@ -345,12 +345,12 @@ OK
<!-- legacy anchor --> <!-- legacy anchor -->
</para> </para>
<para> <para>
Here's an example partition scheme for UEFI, using Heres an example partition scheme for UEFI, using
<literal>/dev/sda</literal> as the device. <literal>/dev/sda</literal> as the device.
</para> </para>
<note> <note>
<para> <para>
You can safely ignore <literal>parted</literal>'s You can safely ignore <literal>parted</literal>s
informational message about needing to update /etc/fstab. informational message about needing to update /etc/fstab.
</para> </para>
</note> </note>
@ -415,12 +415,12 @@ OK
<!-- legacy anchor --> <!-- legacy anchor -->
</para> </para>
<para> <para>
Here's an example partition scheme for Legacy Boot, using Heres an example partition scheme for Legacy Boot, using
<literal>/dev/sda</literal> as the device. <literal>/dev/sda</literal> as the device.
</para> </para>
<note> <note>
<para> <para>
You can safely ignore <literal>parted</literal>'s You can safely ignore <literal>parted</literal>s
informational message about needing to update /etc/fstab. informational message about needing to update /etc/fstab.
</para> </para>
</note> </note>

View File

@ -128,7 +128,7 @@ nixos https://nixos.org/channels/nixos-unstable
You can keep a NixOS system up-to-date automatically by adding the You can keep a NixOS system up-to-date automatically by adding the
following to <literal>configuration.nix</literal>: following to <literal>configuration.nix</literal>:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
system.autoUpgrade.enable = true; system.autoUpgrade.enable = true;
system.autoUpgrade.allowReboot = true; system.autoUpgrade.allowReboot = true;
</programlisting> </programlisting>
@ -145,7 +145,7 @@ system.autoUpgrade.allowReboot = true;
contains a different kernel, initrd or kernel modules. You can contains a different kernel, initrd or kernel modules. You can
also specify a channel explicitly, e.g. also specify a channel explicitly, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
system.autoUpgrade.channel = https://nixos.org/channels/nixos-22.11; system.autoUpgrade.channel = https://nixos.org/channels/nixos-22.11;
</programlisting> </programlisting>
</section> </section>

View File

@ -79,7 +79,7 @@
the NixOS configuration. For instance, if a package the NixOS configuration. For instance, if a package
<literal>foo</literal> provides systemd units, you can say: <literal>foo</literal> provides systemd units, you can say:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
systemd.packages = [ pkgs.foo ]; systemd.packages = [ pkgs.foo ];
} }
@ -88,7 +88,7 @@
to enable those units. You can then set or override unit options to enable those units. You can then set or override unit options
in the usual way, e.g. in the usual way, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
systemd.services.foo.wantedBy = [ &quot;multi-user.target&quot; ]; systemd.services.foo.wantedBy = [ &quot;multi-user.target&quot; ];
systemd.services.foo.serviceConfig.MemoryLimit = &quot;512M&quot;; systemd.services.foo.serviceConfig.MemoryLimit = &quot;512M&quot;;
@ -105,7 +105,7 @@
NixOS configuration requires unfree packages from Nixpkgs, you NixOS configuration requires unfree packages from Nixpkgs, you
need to enable support for them explicitly by setting: need to enable support for them explicitly by setting:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
} }
@ -123,7 +123,7 @@
The Adobe Flash player is no longer enabled by default in the The Adobe Flash player is no longer enabled by default in the
Firefox and Chromium wrappers. To enable it, you must set: Firefox and Chromium wrappers. To enable it, you must set:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.config.firefox.enableAdobeFlash = true; # for Firefox nixpkgs.config.firefox.enableAdobeFlash = true; # for Firefox
@ -136,7 +136,7 @@
The firewall is now enabled by default. If you dont want this, The firewall is now enabled by default. If you dont want this,
you need to disable it explicitly: you need to disable it explicitly:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
networking.firewall.enable = false; networking.firewall.enable = false;
} }

View File

@ -370,7 +370,7 @@
documentation</link> for details. If you wish to continue to use documentation</link> for details. If you wish to continue to use
httpd 2.2, add the following line to your NixOS configuration: httpd 2.2, add the following line to your NixOS configuration:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.httpd.package = pkgs.apacheHttpd_2_2; services.httpd.package = pkgs.apacheHttpd_2_2;
} }

View File

@ -9,12 +9,12 @@
<para> <para>
The <link xlink:href="http://haskell.org/">Haskell</link> The <link xlink:href="http://haskell.org/">Haskell</link>
packages infrastructure has been re-designed from the ground up packages infrastructure has been re-designed from the ground up
(&quot;Haskell NG&quot;). NixOS now distributes the latest (<quote>Haskell NG</quote>). NixOS now distributes the latest
version of every single package registered on version of every single package registered on
<link xlink:href="http://hackage.haskell.org/">Hackage</link> -- <link xlink:href="http://hackage.haskell.org/">Hackage</link> --
well in excess of 8,000 Haskell packages. Detailed instructions well in excess of 8,000 Haskell packages. Detailed instructions
on how to use that infrastructure can be found in the on how to use that infrastructure can be found in the
<link xlink:href="https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure">User's <link xlink:href="https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure">Users
Guide to the Haskell Infrastructure</link>. Users migrating from Guide to the Haskell Infrastructure</link>. Users migrating from
an earlier release may find helpful information below, in the an earlier release may find helpful information below, in the
list of backwards-incompatible changes. Furthermore, we list of backwards-incompatible changes. Furthermore, we
@ -23,8 +23,8 @@
Haskell</link> release since version 0.0 as well as the most Haskell</link> release since version 0.0 as well as the most
recent <link xlink:href="http://www.stackage.org/">Stackage recent <link xlink:href="http://www.stackage.org/">Stackage
Nightly</link> snapshot. The announcement Nightly</link> snapshot. The announcement
<link xlink:href="https://nixos.org/nix-dev/2015-September/018138.html">&quot;Full <link xlink:href="https://nixos.org/nix-dev/2015-September/018138.html"><quote>Full
Stackage Support in Nixpkgs&quot;</link> gives additional Stackage Support in Nixpkgs</quote></link> gives additional
details. details.
</para> </para>
</listitem> </listitem>
@ -42,7 +42,7 @@
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<programlisting language="bash"> <programlisting language="nix">
{ {
system.autoUpgrade.enable = true; system.autoUpgrade.enable = true;
} }
@ -432,7 +432,7 @@
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<programlisting language="bash"> <programlisting language="nix">
{ {
system.stateVersion = &quot;14.12&quot;; system.stateVersion = &quot;14.12&quot;;
} }
@ -464,7 +464,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Steam now doesn't need root rights to work. Instead of using Steam now doesnt need root rights to work. Instead of using
<literal>*-steam-chrootenv</literal>, you should now just run <literal>*-steam-chrootenv</literal>, you should now just run
<literal>steam</literal>. <literal>steamChrootEnv</literal> <literal>steam</literal>. <literal>steamChrootEnv</literal>
package was renamed to <literal>steam</literal>, and old package was renamed to <literal>steam</literal>, and old
@ -523,7 +523,7 @@
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<programlisting language="bash"> <programlisting language="nix">
{ {
fileSystems.&quot;/shiny&quot; = { fileSystems.&quot;/shiny&quot; = {
device = &quot;myshinysharedfolder&quot;; device = &quot;myshinysharedfolder&quot;;
@ -534,15 +534,15 @@
<itemizedlist spacing="compact"> <itemizedlist spacing="compact">
<listitem> <listitem>
<para> <para>
&quot;<literal>nix-env -qa</literal>&quot; no longer discovers <quote><literal>nix-env -qa</literal></quote> no longer
Haskell packages by name. The only packages visible in the discovers Haskell packages by name. The only packages visible in
global scope are <literal>ghc</literal>, the global scope are <literal>ghc</literal>,
<literal>cabal-install</literal>, and <literal>stack</literal>, <literal>cabal-install</literal>, and <literal>stack</literal>,
but all other packages are hidden. The reason for this but all other packages are hidden. The reason for this
inconvenience is the sheer size of the Haskell package set. inconvenience is the sheer size of the Haskell package set.
Name-based lookups are expensive, and most Name-based lookups are expensive, and most
<literal>nix-env -qa</literal> operations would become much <literal>nix-env -qa</literal> operations would become much
slower if we'd add the entire Hackage database into the top slower if wed add the entire Hackage database into the top
level attribute set. Instead, the list of Haskell packages can level attribute set. Instead, the list of Haskell packages can
be displayed by running: be displayed by running:
</para> </para>
@ -566,13 +566,13 @@ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA haskellPackages.pandoc
<para> <para>
Previous versions of NixOS came with a feature called Previous versions of NixOS came with a feature called
<literal>ghc-wrapper</literal>, a small script that allowed GHC <literal>ghc-wrapper</literal>, a small script that allowed GHC
to transparently pick up on libraries installed in the user's to transparently pick up on libraries installed in the users
profile. This feature has been deprecated; profile. This feature has been deprecated;
<literal>ghc-wrapper</literal> was removed from the <literal>ghc-wrapper</literal> was removed from the
distribution. The proper way to register Haskell libraries with distribution. The proper way to register Haskell libraries with
the compiler now is the the compiler now is the
<literal>haskellPackages.ghcWithPackages</literal> function. The <literal>haskellPackages.ghcWithPackages</literal> function. The
<link xlink:href="https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure">User's <link xlink:href="https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure">Users
Guide to the Haskell Infrastructure</link> provides more Guide to the Haskell Infrastructure</link> provides more
information about this subject. information about this subject.
</para> </para>
@ -593,7 +593,7 @@ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA haskellPackages.pandoc
have a function attribute called <literal>extension</literal> have a function attribute called <literal>extension</literal>
that users could override in their that users could override in their
<literal>~/.nixpkgs/config.nix</literal> files to configure <literal>~/.nixpkgs/config.nix</literal> files to configure
additional attributes, etc. That function still exists, but it's additional attributes, etc. That function still exists, but its
now called <literal>overrides</literal>. now called <literal>overrides</literal>.
</para> </para>
</listitem> </listitem>
@ -662,7 +662,7 @@ infinite recursion encountered
<literal>lib</literal>, after adding it as argument of the <literal>lib</literal>, after adding it as argument of the
module. The following module module. The following module
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
with pkgs.lib; with pkgs.lib;
@ -677,7 +677,7 @@ with pkgs.lib;
<para> <para>
should be modified to look like: should be modified to look like:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
with lib; with lib;
@ -695,7 +695,7 @@ with lib;
replaced by <literal>(import &lt;nixpkgs&gt; {})</literal>. The replaced by <literal>(import &lt;nixpkgs&gt; {})</literal>. The
following module following module
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
@ -712,7 +712,7 @@ in
<para> <para>
should be modified to look like: should be modified to look like:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
@ -748,7 +748,7 @@ in
<literal>/etc/ssh/moduli</literal> file with respect to the <literal>/etc/ssh/moduli</literal> file with respect to the
<link xlink:href="https://stribika.github.io/2015/01/04/secure-secure-shell.html">vulnerabilities <link xlink:href="https://stribika.github.io/2015/01/04/secure-secure-shell.html">vulnerabilities
discovered in the Diffie-Hellman key exchange</link> can now discovered in the Diffie-Hellman key exchange</link> can now
replace OpenSSH's default version with one they generated replace OpenSSHs default version with one they generated
themselves using the new themselves using the new
<literal>services.openssh.moduliFile</literal> option. <literal>services.openssh.moduliFile</literal> option.
</para> </para>

View File

@ -378,7 +378,7 @@
You will need to add an import statement to your NixOS You will need to add an import statement to your NixOS
configuration in order to use it, e.g. configuration in order to use it, e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
imports = [ &lt;nixpkgs/nixos/modules/services/misc/gitit.nix&gt; ]; imports = [ &lt;nixpkgs/nixos/modules/services/misc/gitit.nix&gt; ];
} }
@ -395,7 +395,7 @@
to be built in. All modules now reside in to be built in. All modules now reside in
<literal>nginxModules</literal> set. Example configuration: <literal>nginxModules</literal> set. Example configuration:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
nginx.override { nginx.override {
modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ]; modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ];
} }
@ -403,7 +403,7 @@ nginx.override {
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>s3sync</literal> is removed, as it hasn't been <literal>s3sync</literal> is removed, as it hasnt been
developed by upstream for 4 years and only runs with ruby 1.8. developed by upstream for 4 years and only runs with ruby 1.8.
For an actively-developer alternative look at For an actively-developer alternative look at
<literal>tarsnap</literal> and others. <literal>tarsnap</literal> and others.
@ -411,7 +411,7 @@ nginx.override {
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>ruby_1_8</literal> has been removed as it's not <literal>ruby_1_8</literal> has been removed as its not
supported from upstream anymore and probably contains security supported from upstream anymore and probably contains security
issues. issues.
</para> </para>
@ -439,7 +439,7 @@ nginx.override {
<listitem> <listitem>
<para> <para>
The <literal>Ctrl+Alt+Backspace</literal> key combination no The <literal>Ctrl+Alt+Backspace</literal> key combination no
longer kills the X server by default. There's a new option longer kills the X server by default. Theres a new option
<literal>services.xserver.enableCtrlAltBackspace</literal> <literal>services.xserver.enableCtrlAltBackspace</literal>
allowing to enable the combination again. allowing to enable the combination again.
</para> </para>
@ -457,7 +457,7 @@ nginx.override {
<literal>/var/lib/postfix</literal>. Old configurations are <literal>/var/lib/postfix</literal>. Old configurations are
migrated automatically. <literal>service.postfix</literal> migrated automatically. <literal>service.postfix</literal>
module has also received many improvements, such as correct module has also received many improvements, such as correct
directories' access rights, new <literal>aliasFiles</literal> directories access rights, new <literal>aliasFiles</literal>
and <literal>mapFiles</literal> options and more. and <literal>mapFiles</literal> options and more.
</para> </para>
</listitem> </listitem>
@ -468,7 +468,7 @@ nginx.override {
continue to work, but print a warning, until the 16.09 release. continue to work, but print a warning, until the 16.09 release.
An example of the new style: An example of the new style:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
fileSystems.&quot;/example&quot; = { fileSystems.&quot;/example&quot; = {
device = &quot;/dev/sdc&quot;; device = &quot;/dev/sdc&quot;;
@ -497,7 +497,7 @@ nginx.override {
<para> <para>
There are also Gutenprint improvements; in particular, a new There are also Gutenprint improvements; in particular, a new
option <literal>services.printing.gutenprint</literal> is added option <literal>services.printing.gutenprint</literal> is added
to enable automatic updating of Gutenprint PPMs; it's greatly to enable automatic updating of Gutenprint PPMs; its greatly
recommended to enable it instead of adding recommended to enable it instead of adding
<literal>gutenprint</literal> to the <literal>drivers</literal> <literal>gutenprint</literal> to the <literal>drivers</literal>
list. list.
@ -524,7 +524,7 @@ nginx.override {
used input method name, <literal>&quot;ibus&quot;</literal> for used input method name, <literal>&quot;ibus&quot;</literal> for
ibus. An example of the new style: ibus. An example of the new style:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
i18n.inputMethod.enabled = &quot;ibus&quot;; i18n.inputMethod.enabled = &quot;ibus&quot;;
i18n.inputMethod.ibus.engines = with pkgs.ibus-engines; [ anthy mozc ]; i18n.inputMethod.ibus.engines = with pkgs.ibus-engines; [ anthy mozc ];
@ -533,7 +533,7 @@ nginx.override {
<para> <para>
That is equivalent to the old version: That is equivalent to the old version:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
programs.ibus.enable = true; programs.ibus.enable = true;
programs.ibus.plugins = with pkgs; [ ibus-anthy mozc ]; programs.ibus.plugins = with pkgs; [ ibus-anthy mozc ];
@ -545,7 +545,7 @@ nginx.override {
<literal>services.udev.extraRules</literal> option now writes <literal>services.udev.extraRules</literal> option now writes
rules to <literal>99-local.rules</literal> instead of rules to <literal>99-local.rules</literal> instead of
<literal>10-local.rules</literal>. This makes all the user rules <literal>10-local.rules</literal>. This makes all the user rules
apply after others, so their results wouldn't be overridden by apply after others, so their results wouldnt be overridden by
anything else. anything else.
</para> </para>
</listitem> </listitem>
@ -587,7 +587,7 @@ $TTL 1800
point to exact folder where syncthing is writing to. Example point to exact folder where syncthing is writing to. Example
configuration should look something like: configuration should look something like:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.syncthing = { services.syncthing = {
enable = true; enable = true;
@ -632,8 +632,8 @@ error: path /nix/store/*-broadcom-sta-* does not exist and cannot be creat
The <literal>services.xserver.startGnuPGAgent</literal> option The <literal>services.xserver.startGnuPGAgent</literal> option
has been removed. GnuPG 2.1.x changed the way the gpg-agent has been removed. GnuPG 2.1.x changed the way the gpg-agent
works, and that new approach no longer requires (or even works, and that new approach no longer requires (or even
supports) the &quot;start everything as a child of the supports) the <quote>start everything as a child of the
agent&quot; scheme we've implemented in NixOS for older agent</quote> scheme weve implemented in NixOS for older
versions. To configure the gpg-agent for your X session, add the versions. To configure the gpg-agent for your X session, add the
following code to <literal>~/.bashrc</literal> or some file following code to <literal>~/.bashrc</literal> or some file
thats sourced when your shell is started: thats sourced when your shell is started:
@ -670,7 +670,7 @@ export GPG_TTY
</programlisting> </programlisting>
<para> <para>
The <literal>gpg-agent(1)</literal> man page has more details The <literal>gpg-agent(1)</literal> man page has more details
about this subject, i.e. in the &quot;EXAMPLES&quot; section. about this subject, i.e. in the <quote>EXAMPLES</quote> section.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>

View File

@ -78,7 +78,7 @@
LTS Haskell package set. That support has been dropped. The LTS Haskell package set. That support has been dropped. The
previously provided <literal>haskell.packages.lts-x_y</literal> previously provided <literal>haskell.packages.lts-x_y</literal>
package sets still exist in name to aviod breaking user code, package sets still exist in name to aviod breaking user code,
but these package sets don't actually contain the versions but these package sets dont actually contain the versions
mandated by the corresponding LTS release. Instead, our package mandated by the corresponding LTS release. Instead, our package
set it loosely based on the latest available LTS release, i.e. set it loosely based on the latest available LTS release, i.e.
LTS 7.x at the time of this writing. New releases of NixOS and LTS 7.x at the time of this writing. New releases of NixOS and
@ -119,7 +119,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Gitlab's maintainance script <literal>gitlab-runner</literal> Gitlabs maintainance script <literal>gitlab-runner</literal>
was removed and split up into the more clearer was removed and split up into the more clearer
<literal>gitlab-run</literal> and <literal>gitlab-rake</literal> <literal>gitlab-run</literal> and <literal>gitlab-rake</literal>
scripts, because <literal>gitlab-runner</literal> is a component scripts, because <literal>gitlab-runner</literal> is a component
@ -164,7 +164,7 @@
<para> <para>
<literal>goPackages</literal> was replaced with separated Go <literal>goPackages</literal> was replaced with separated Go
applications in appropriate <literal>nixpkgs</literal> applications in appropriate <literal>nixpkgs</literal>
categories. Each Go package uses its own dependency set. There's categories. Each Go package uses its own dependency set. Theres
also a new <literal>go2nix</literal> tool introduced to generate also a new <literal>go2nix</literal> tool introduced to generate
a Go package definition from its Go source automatically. a Go package definition from its Go source automatically.
</para> </para>
@ -192,7 +192,7 @@
interface has been streamlined. Desktop users should be able to interface has been streamlined. Desktop users should be able to
simply set simply set
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
security.grsecurity.enable = true; security.grsecurity.enable = true;
} }

View File

@ -22,7 +22,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The default desktop environment now is KDE's Plasma 5. KDE 4 The default desktop environment now is KDEs Plasma 5. KDE 4
has been removed has been removed
</para> </para>
</listitem> </listitem>
@ -560,7 +560,7 @@
Parsoid service now uses YAML configuration format. Parsoid service now uses YAML configuration format.
<literal>service.parsoid.interwikis</literal> is now called <literal>service.parsoid.interwikis</literal> is now called
<literal>service.parsoid.wikis</literal> and is a list of <literal>service.parsoid.wikis</literal> and is a list of
either API URLs or attribute sets as specified in parsoid's either API URLs or attribute sets as specified in parsoids
documentation. documentation.
</para> </para>
</listitem> </listitem>
@ -581,7 +581,7 @@
<literal>service.nylon</literal> is now declared using named <literal>service.nylon</literal> is now declared using named
instances. As an example: instances. As an example:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.nylon = { services.nylon = {
enable = true; enable = true;
@ -594,7 +594,7 @@
<para> <para>
should be replaced with: should be replaced with:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.nylon.myvpn = { services.nylon.myvpn = {
enable = true; enable = true;
@ -615,7 +615,7 @@
<link xlink:href="https://nixos.org/nixpkgs/manual/#sec-overlays-install"> <link xlink:href="https://nixos.org/nixpkgs/manual/#sec-overlays-install">
overlays</link>. For example, the following code: overlays</link>. For example, the following code:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
let let
pkgs = import &lt;nixpkgs&gt; {}; pkgs = import &lt;nixpkgs&gt; {};
in in
@ -624,7 +624,7 @@ in
<para> <para>
should be replaced by: should be replaced by:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
let let
pkgs = import &lt;nixpkgs&gt; {}; pkgs = import &lt;nixpkgs&gt; {};
in in
@ -647,7 +647,7 @@ in
<listitem> <listitem>
<para> <para>
<literal>local_recipient_maps</literal> is not set to empty <literal>local_recipient_maps</literal> is not set to empty
value by Postfix service. It's an insecure default as stated value by Postfix service. Its an insecure default as stated
by Postfix documentation. Those who want to retain this by Postfix documentation. Those who want to retain this
setting need to set it via setting need to set it via
<literal>services.postfix.extraConfig</literal>. <literal>services.postfix.extraConfig</literal>.
@ -669,7 +669,7 @@ in
<listitem> <listitem>
<para> <para>
The socket handling of the <literal>services.rmilter</literal> The socket handling of the <literal>services.rmilter</literal>
module has been fixed and refactored. As rmilter doesn't module has been fixed and refactored. As rmilter doesnt
support binding to more than one socket, the options support binding to more than one socket, the options
<literal>bindUnixSockets</literal> and <literal>bindUnixSockets</literal> and
<literal>bindInetSockets</literal> have been replaced by <literal>bindInetSockets</literal> have been replaced by
@ -729,7 +729,7 @@ in
improves visual consistency and makes Java follow system font improves visual consistency and makes Java follow system font
style, improving the situation on HighDPI displays. This has a style, improving the situation on HighDPI displays. This has a
cost of increased closure size; for server and other headless cost of increased closure size; for server and other headless
workloads it's recommended to use workloads its recommended to use
<literal>jre_headless</literal>. <literal>jre_headless</literal>.
</para> </para>
</listitem> </listitem>

View File

@ -26,10 +26,10 @@
The module option The module option
<literal>services.xserver.xrandrHeads</literal> now causes the <literal>services.xserver.xrandrHeads</literal> now causes the
first head specified in this list to be set as the primary first head specified in this list to be set as the primary
head. Apart from that, it's now possible to also set head. Apart from that, its now possible to also set
additional options by using an attribute set, for example: additional options by using an attribute set, for example:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ services.xserver.xrandrHeads = [ { services.xserver.xrandrHeads = [
&quot;HDMI-0&quot; &quot;HDMI-0&quot;
{ {
@ -543,7 +543,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Radicale's default package has changed from 1.x to 2.x. Radicales default package has changed from 1.x to 2.x.
Instructions to migrate can be found Instructions to migrate can be found
<link xlink:href="http://radicale.org/1to2/"> here <link xlink:href="http://radicale.org/1to2/"> here
</link>. It is also possible to use the newer version by </link>. It is also possible to use the newer version by
@ -582,7 +582,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>flexget</literal>'s state database cannot be upgraded <literal>flexget</literal>s state database cannot be upgraded
to its new internal format, requiring removal of any existing to its new internal format, requiring removal of any existing
<literal>db-config.sqlite</literal> which will be <literal>db-config.sqlite</literal> which will be
automatically recreated. automatically recreated.
@ -590,9 +590,9 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The <literal>ipfs</literal> service now doesn't ignore the The <literal>ipfs</literal> service now doesnt ignore the
<literal>dataDir</literal> option anymore. If you've ever set <literal>dataDir</literal> option anymore. If youve ever set
this option to anything other than the default you'll have to this option to anything other than the default youll have to
either unset it (so the default gets used) or migrate the old either unset it (so the default gets used) or migrate the old
data manually with data manually with
</para> </para>
@ -651,16 +651,16 @@ rmdir /var/lib/ipfs/.ipfs
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>cc-wrapper</literal>'s setup-hook now exports a <literal>cc-wrapper</literal><quote>s setup-hook now exports a
number of environment variables corresponding to binutils number of environment variables corresponding to binutils
binaries, (e.g. <literal>LD</literal>, binaries, (e.g. <literal>LD</literal>,
<literal>STRIP</literal>, <literal>RANLIB</literal>, etc). <literal>STRIP</literal>, <literal>RANLIB</literal>, etc).
This is done to prevent packages' build systems guessing, This is done to prevent packages</quote> build systems
which is harder to predict, especially when cross-compiling. guessing, which is harder to predict, especially when
However, some packages have broken due to this—their build cross-compiling. However, some packages have broken due to
systems either not supporting, or claiming to support without this—their build systems either not supporting, or claiming to
adequate testing, taking such environment variables as support without adequate testing, taking such environment
parameters. variables as parameters.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -688,10 +688,10 @@ rmdir /var/lib/ipfs/.ipfs
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
grsecurity/PaX support has been dropped, following upstream's grsecurity/PaX support has been dropped, following upstreams
decision to cease free support. See decision to cease free support. See
<link xlink:href="https://grsecurity.net/passing_the_baton.php"> <link xlink:href="https://grsecurity.net/passing_the_baton.php">
upstream's announcement</link> for more information. No upstreams announcement</link> for more information. No
complete replacement for grsecurity/PaX is available complete replacement for grsecurity/PaX is available
presently. presently.
</para> </para>
@ -794,7 +794,7 @@ FLUSH PRIVILEGES;
<para> <para>
Modules can now be disabled by using Modules can now be disabled by using
<link xlink:href="https://nixos.org/nixpkgs/manual/#sec-replace-modules"> <link xlink:href="https://nixos.org/nixpkgs/manual/#sec-replace-modules">
disabledModules</link>, allowing another to take it's place. disabledModules</link>, allowing another to take its place.
This can be used to import a set of modules from another This can be used to import a set of modules from another
channel while keeping the rest of the system on a stable channel while keeping the rest of the system on a stable
release. release.
@ -808,7 +808,7 @@ FLUSH PRIVILEGES;
provided by fontconfig-penultimate, replacing provided by fontconfig-penultimate, replacing
fontconfig-ultimate; the new defaults are less invasive and fontconfig-ultimate; the new defaults are less invasive and
provide rendering that is more consistent with other systems provide rendering that is more consistent with other systems
and hopefully with each font designer's intent. Some and hopefully with each font designers intent. Some
system-wide configuration has been removed from the Fontconfig system-wide configuration has been removed from the Fontconfig
NixOS module where user Fontconfig settings are available. NixOS module where user Fontconfig settings are available.
</para> </para>

View File

@ -16,9 +16,9 @@
<listitem> <listitem>
<para> <para>
Platform support: x86_64-linux and x86_64-darwin since release Platform support: x86_64-linux and x86_64-darwin since release
time (the latter isn't NixOS, really). Binaries for time (the latter isnt NixOS, really). Binaries for
aarch64-linux are available, but no channel exists yet, as aarch64-linux are available, but no channel exists yet, as
it's waiting for some test fixes, etc. its waiting for some test fixes, etc.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -495,11 +495,11 @@
<para> <para>
The propagation logic has been changed. The new logic, along The propagation logic has been changed. The new logic, along
with new types of dependencies that go with, is thoroughly with new types of dependencies that go with, is thoroughly
documented in the &quot;Specifying dependencies&quot; section documented in the <quote>Specifying dependencies</quote>
of the &quot;Standard Environment&quot; chapter of the nixpkgs section of the <quote>Standard Environment</quote> chapter of
manual. The old logic isn't but is easy to describe: the nixpkgs manual. The old logic isnt but is easy to
dependencies were propagated as the same type of dependency no describe: dependencies were propagated as the same type of
matter what. In practice, that means that many dependency no matter what. In practice, that means that many
<literal>propagatedNativeBuildInputs</literal> should instead <literal>propagatedNativeBuildInputs</literal> should instead
be <literal>propagatedBuildInputs</literal>. Thankfully, that be <literal>propagatedBuildInputs</literal>. Thankfully, that
was and is the least used type of dependency. Also, it means was and is the least used type of dependency. Also, it means
@ -541,7 +541,7 @@
Previously, if other options in the Postfix module like Previously, if other options in the Postfix module like
<literal>services.postfix.useSrs</literal> were set and the <literal>services.postfix.useSrs</literal> were set and the
user set config options that were also set by such options, user set config options that were also set by such options,
the resulting config wouldn't include all options that were the resulting config wouldnt include all options that were
needed. They are now merged correctly. If config options need needed. They are now merged correctly. If config options need
to be overridden, <literal>lib.mkForce</literal> or to be overridden, <literal>lib.mkForce</literal> or
<literal>lib.mkOverride</literal> can be used. <literal>lib.mkOverride</literal> can be used.
@ -626,7 +626,7 @@
if <literal>config.networking.domain</literal> is set, if <literal>config.networking.domain</literal> is set,
<literal>matomo.${config.networking.hostName}</literal> if <literal>matomo.${config.networking.hostName}</literal> if
it is not set. If you change your it is not set. If you change your
<literal>serverName</literal>, remember you'll need to <literal>serverName</literal>, remember youll need to
update the <literal>trustedHosts[]</literal> array in update the <literal>trustedHosts[]</literal> array in
<literal>/var/lib/matomo/config/config.ini.php</literal> <literal>/var/lib/matomo/config/config.ini.php</literal>
as well. as well.
@ -793,7 +793,7 @@
<para> <para>
<literal>services.btrfs.autoScrub</literal> has been added, to <literal>services.btrfs.autoScrub</literal> has been added, to
periodically check btrfs filesystems for data corruption. If periodically check btrfs filesystems for data corruption. If
there's a correct copy available, it will automatically repair theres a correct copy available, it will automatically repair
corrupted blocks. corrupted blocks.
</para> </para>
</listitem> </listitem>
@ -830,7 +830,7 @@
<para> <para>
In order to have the previous default configuration add In order to have the previous default configuration add
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.xserver.displayManager.lightdm.greeters.gtk.indicators = [ services.xserver.displayManager.lightdm.greeters.gtk.indicators = [
&quot;~host&quot; &quot;~spacer&quot; &quot;~host&quot; &quot;~spacer&quot;

View File

@ -54,7 +54,7 @@
<para> <para>
For example For example
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
programs.firejail = { programs.firejail = {
enable = true; enable = true;
@ -523,8 +523,8 @@ $ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
<listitem> <listitem>
<para> <para>
The <literal>netcat</literal> package is now taken directly The <literal>netcat</literal> package is now taken directly
from OpenBSD's <literal>libressl</literal>, instead of relying from OpenBSDs <literal>libressl</literal>, instead of relying
on Debian's fork. The new version should be very close to the on Debians fork. The new version should be very close to the
old version, but there are some minor differences. old version, but there are some minor differences.
Importantly, flags like -b, -q, -C, and -Z are no longer Importantly, flags like -b, -q, -C, and -Z are no longer
accepted by the nc command. accepted by the nc command.
@ -533,7 +533,7 @@ $ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
<listitem> <listitem>
<para> <para>
The <literal>services.docker-registry.extraConfig</literal> The <literal>services.docker-registry.extraConfig</literal>
object doesn't contain environment variables anymore. Instead object doesnt contain environment variables anymore. Instead
it needs to provide an object structure that can be mapped it needs to provide an object structure that can be mapped
onto the YAML configuration defined in onto the YAML configuration defined in
<link xlink:href="https://github.com/docker/distribution/blob/v2.6.2/docs/configuration.md">the <link xlink:href="https://github.com/docker/distribution/blob/v2.6.2/docs/configuration.md">the
@ -543,7 +543,7 @@ $ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
<listitem> <listitem>
<para> <para>
<literal>gnucash</literal> has changed from version 2.4 to <literal>gnucash</literal> has changed from version 2.4 to
3.x. If you've been using <literal>gnucash</literal> (version 3.x. If youve been using <literal>gnucash</literal> (version
2.4) instead of <literal>gnucash26</literal> (version 2.6) you 2.4) instead of <literal>gnucash26</literal> (version 2.6) you
must open your Gnucash data file(s) with must open your Gnucash data file(s) with
<literal>gnucash26</literal> and then save them to upgrade the <literal>gnucash26</literal> and then save them to upgrade the
@ -695,7 +695,7 @@ $ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
A NixOS system can now be constructed more easily based on a A NixOS system can now be constructed more easily based on a
preexisting invocation of Nixpkgs. For example: preexisting invocation of Nixpkgs. For example:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
inherit (pkgs.nixos { inherit (pkgs.nixos {
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
@ -791,7 +791,7 @@ $ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
<para> <para>
An example usage of this would be: An example usage of this would be:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ config, ... }: { config, ... }:
{ {
@ -874,7 +874,7 @@ $ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
The <literal>programs.screen</literal> module provides allows The <literal>programs.screen</literal> module provides allows
to configure <literal>/etc/screenrc</literal>, however the to configure <literal>/etc/screenrc</literal>, however the
module behaved fairly counterintuitive as the config exists, module behaved fairly counterintuitive as the config exists,
but the package wasn't available. Since 18.09 but the package wasnt available. Since 18.09
<literal>pkgs.screen</literal> will be added to <literal>pkgs.screen</literal> will be added to
<literal>environment.systemPackages</literal>. <literal>environment.systemPackages</literal>.
</para> </para>
@ -920,7 +920,7 @@ $ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
<para> <para>
NixOS option descriptions are now automatically broken up into NixOS option descriptions are now automatically broken up into
individual paragraphs if the text contains two consecutive individual paragraphs if the text contains two consecutive
newlines, so it's no longer necessary to use newlines, so its no longer necessary to use
<literal>&lt;/para&gt;&lt;para&gt;</literal> to start a new <literal>&lt;/para&gt;&lt;para&gt;</literal> to start a new
paragraph. paragraph.
</para> </para>

View File

@ -29,9 +29,9 @@
<para> <para>
By default, By default,
<literal>services.xserver.desktopManager.pantheon</literal> <literal>services.xserver.desktopManager.pantheon</literal>
enables LightDM as a display manager, as pantheon's screen enables LightDM as a display manager, as pantheons screen
locking implementation relies on it. Because of that it is locking implementation relies on it. Because of that it is
recommended to leave LightDM enabled. If you'd like to recommended to leave LightDM enabled. If youd like to
disable it anyway, set disable it anyway, set
<literal>services.xserver.displayManager.lightdm.enable</literal> <literal>services.xserver.displayManager.lightdm.enable</literal>
to <literal>false</literal> and enable your preferred to <literal>false</literal> and enable your preferred
@ -39,8 +39,8 @@
</para> </para>
</note> </note>
<para> <para>
Also note that Pantheon's LightDM greeter is not enabled by Also note that Pantheons LightDM greeter is not enabled by
default, because it has numerous issues in NixOS and isn't default, because it has numerous issues in NixOS and isnt
optimal for use here yet. optimal for use here yet.
</para> </para>
</listitem> </listitem>
@ -200,7 +200,7 @@
<listitem> <listitem>
<para> <para>
The <literal>ntp</literal> module now has sane default The <literal>ntp</literal> module now has sane default
restrictions. If you're relying on the previous defaults, restrictions. If youre relying on the previous defaults,
which permitted all queries and commands from all which permitted all queries and commands from all
firewall-permitted sources, you can set firewall-permitted sources, you can set
<literal>services.ntp.restrictDefault</literal> and <literal>services.ntp.restrictDefault</literal> and
@ -342,7 +342,7 @@
preserved when also setting interface specific rules such as preserved when also setting interface specific rules such as
<literal>networking.firewall.interfaces.en0.allow*</literal>. <literal>networking.firewall.interfaces.en0.allow*</literal>.
These rules continue to use the pseudo device These rules continue to use the pseudo device
&quot;default&quot; <quote>default</quote>
(<literal>networking.firewall.interfaces.default.*</literal>), (<literal>networking.firewall.interfaces.default.*</literal>),
and assigning to this pseudo device will override the and assigning to this pseudo device will override the
(<literal>networking.firewall.allow*</literal>) options. (<literal>networking.firewall.allow*</literal>) options.
@ -360,9 +360,9 @@
presence of <literal>services.sssd.enable = true</literal> presence of <literal>services.sssd.enable = true</literal>
because nscd caching would interfere with because nscd caching would interfere with
<literal>sssd</literal> in unpredictable ways as well. Because <literal>sssd</literal> in unpredictable ways as well. Because
we're using nscd not for caching, but for convincing glibc to were using nscd not for caching, but for convincing glibc to
find NSS modules in the nix store instead of an absolute path, find NSS modules in the nix store instead of an absolute path,
we have decided to disable caching globally now, as it's we have decided to disable caching globally now, as its
usually not the behaviour the user wants and can lead to usually not the behaviour the user wants and can lead to
surprising behaviour. Furthermore, negative caching of host surprising behaviour. Furthermore, negative caching of host
lookups is also disabled now by default. This should fix the lookups is also disabled now by default. This should fix the
@ -374,7 +374,7 @@
setting the <literal>services.nscd.config</literal> option setting the <literal>services.nscd.config</literal> option
with the desired caching parameters. with the desired caching parameters.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.nscd.config = services.nscd.config =
'' ''
@ -453,7 +453,7 @@
with its control field set to <literal>sufficient</literal> with its control field set to <literal>sufficient</literal>
instead of <literal>required</literal>, so that password instead of <literal>required</literal>, so that password
managed only by later PAM password modules are being executed. managed only by later PAM password modules are being executed.
Previously, for example, changing an LDAP account's password Previously, for example, changing an LDAP accounts password
through PAM was not possible: the whole password module through PAM was not possible: the whole password module
verification was exited prematurely by verification was exited prematurely by
<literal>pam_unix</literal>, preventing <literal>pam_unix</literal>, preventing
@ -497,11 +497,11 @@
<link xlink:href="https://matrix.org/blog/2019/02/05/synapse-0-99-0/">the <link xlink:href="https://matrix.org/blog/2019/02/05/synapse-0-99-0/">the
last version to accept self-signed certificates</link>. As last version to accept self-signed certificates</link>. As
such, it is now recommended to use a proper certificate such, it is now recommended to use a proper certificate
verified by a root CA (for example Let's Encrypt). The new verified by a root CA (for example Lets Encrypt). The new
<link linkend="module-services-matrix">manual chapter on <link linkend="module-services-matrix">manual chapter on
Matrix</link> contains a working example of using nginx as a Matrix</link> contains a working example of using nginx as a
reverse proxy in front of <literal>matrix-synapse</literal>, reverse proxy in front of <literal>matrix-synapse</literal>,
using Let's Encrypt certificates. using Lets Encrypt certificates.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -682,7 +682,7 @@
<link xlink:href="options.html#opt-services.ndppd.enable">all <link xlink:href="options.html#opt-services.ndppd.enable">all
config options</link> provided by the current upstream version config options</link> provided by the current upstream version
as service options. Additionally the <literal>ndppd</literal> as service options. Additionally the <literal>ndppd</literal>
package doesn't contain the systemd unit configuration from package doesnt contain the systemd unit configuration from
upstream anymore, the unit is completely configured by the upstream anymore, the unit is completely configured by the
NixOS module now. NixOS module now.
</para> </para>

View File

@ -82,13 +82,13 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
We've updated to Xfce 4.14, which brings a new module Weve updated to Xfce 4.14, which brings a new module
<literal>services.xserver.desktopManager.xfce4-14</literal>. <literal>services.xserver.desktopManager.xfce4-14</literal>.
If you'd like to upgrade, please switch from the If youd like to upgrade, please switch from the
<literal>services.xserver.desktopManager.xfce</literal> module <literal>services.xserver.desktopManager.xfce</literal> module
as it will be deprecated in a future release. They're as it will be deprecated in a future release. Theyre
incompatibilities with the current Xfce module; it doesn't incompatibilities with the current Xfce module; it doesnt
support <literal>thunarPlugins</literal> and it isn't support <literal>thunarPlugins</literal> and it isnt
recommended to use recommended to use
<literal>services.xserver.desktopManager.xfce</literal> and <literal>services.xserver.desktopManager.xfce</literal> and
<literal>services.xserver.desktopManager.xfce4-14</literal> <literal>services.xserver.desktopManager.xfce4-14</literal>
@ -125,7 +125,7 @@
</itemizedlist> </itemizedlist>
<para> <para>
With these options we hope to give users finer grained control With these options we hope to give users finer grained control
over their systems. Prior to this change you'd either have to over their systems. Prior to this change youd either have to
manually disable options or use manually disable options or use
<literal>environment.gnome3.excludePackages</literal> which <literal>environment.gnome3.excludePackages</literal> which
only excluded the optional applications. only excluded the optional applications.
@ -138,7 +138,7 @@
<listitem> <listitem>
<para> <para>
Orthogonal to the previous changes to the GNOME 3 desktop Orthogonal to the previous changes to the GNOME 3 desktop
manager module, we've updated all default services and manager module, weve updated all default services and
applications to match as close as possible to a default applications to match as close as possible to a default
reference GNOME 3 experience. reference GNOME 3 experience.
</para> </para>
@ -295,7 +295,7 @@
<literal>services.xserver.desktopManager.mate</literal> <literal>services.xserver.desktopManager.mate</literal>
Note Mate uses Note Mate uses
<literal>programs.system-config-printer</literal> as it <literal>programs.system-config-printer</literal> as it
doesn't use it as a service, but its graphical interface doesnt use it as a service, but its graphical interface
directly. directly.
</para> </para>
</listitem> </listitem>
@ -347,7 +347,7 @@
<literal>services.prometheus.alertmanager.user</literal> and <literal>services.prometheus.alertmanager.user</literal> and
<literal>services.prometheus.alertmanager.group</literal> have <literal>services.prometheus.alertmanager.group</literal> have
been removed because the alertmanager service is now using been removed because the alertmanager service is now using
systemd's systemds
<link xlink:href="http://0pointer.net/blog/dynamic-users-with-systemd.html"> <link xlink:href="http://0pointer.net/blog/dynamic-users-with-systemd.html">
DynamicUser mechanism</link> which obviates these options. DynamicUser mechanism</link> which obviates these options.
</para> </para>
@ -366,7 +366,7 @@
The <literal>services.nzbget.configFile</literal> and The <literal>services.nzbget.configFile</literal> and
<literal>services.nzbget.openFirewall</literal> options were <literal>services.nzbget.openFirewall</literal> options were
removed as they are managed internally by the nzbget. The removed as they are managed internally by the nzbget. The
<literal>services.nzbget.dataDir</literal> option hadn't <literal>services.nzbget.dataDir</literal> option hadnt
actually been used by the module for some time and so was actually been used by the module for some time and so was
removed as cleanup. removed as cleanup.
</para> </para>
@ -475,7 +475,7 @@
Make sure you set the <literal>_netdev</literal> option for Make sure you set the <literal>_netdev</literal> option for
each of the file systems referring to block devices provided each of the file systems referring to block devices provided
by the autoLuks module. Not doing this might render the system by the autoLuks module. Not doing this might render the system
in a state where it doesn't boot anymore. in a state where it doesnt boot anymore.
</para> </para>
<para> <para>
If you are actively using the <literal>autoLuks</literal> If you are actively using the <literal>autoLuks</literal>
@ -667,7 +667,7 @@
instead of depending on the catch-all instead of depending on the catch-all
<literal>acme-certificates.target</literal>. This target unit <literal>acme-certificates.target</literal>. This target unit
was also removed from the codebase. This will mean nginx will was also removed from the codebase. This will mean nginx will
no longer depend on certificates it isn't explicitly managing no longer depend on certificates it isnt explicitly managing
and fixes a bug with certificate renewal ordering racing with and fixes a bug with certificate renewal ordering racing with
nginx restarting which could lead to nginx getting in a broken nginx restarting which could lead to nginx getting in a broken
state as described at state as described at
@ -687,8 +687,8 @@
<literal>services.xserver.desktopManager.xterm</literal> is <literal>services.xserver.desktopManager.xterm</literal> is
now disabled by default if <literal>stateVersion</literal> is now disabled by default if <literal>stateVersion</literal> is
19.09 or higher. Previously the xterm desktopManager was 19.09 or higher. Previously the xterm desktopManager was
enabled when xserver was enabled, but it isn't useful for all enabled when xserver was enabled, but it isnt useful for all
people so it didn't make sense to have any desktopManager people so it didnt make sense to have any desktopManager
enabled default. enabled default.
</para> </para>
</listitem> </listitem>
@ -696,7 +696,7 @@
<para> <para>
The WeeChat plugin The WeeChat plugin
<literal>pkgs.weechatScripts.weechat-xmpp</literal> has been <literal>pkgs.weechatScripts.weechat-xmpp</literal> has been
removed as it doesn't receive any updates from upstream and removed as it doesnt receive any updates from upstream and
depends on outdated Python2-based modules. depends on outdated Python2-based modules.
</para> </para>
</listitem> </listitem>
@ -744,11 +744,11 @@
<literal>services.gitlab.secrets.dbFile</literal>, <literal>services.gitlab.secrets.dbFile</literal>,
<literal>services.gitlab.secrets.otpFile</literal> and <literal>services.gitlab.secrets.otpFile</literal> and
<literal>services.gitlab.secrets.jwsFile</literal>). This was <literal>services.gitlab.secrets.jwsFile</literal>). This was
done so that secrets aren't stored in the world-readable nix done so that secrets arent stored in the world-readable nix
store, but means that for each option you'll have to create a store, but means that for each option youll have to create a
file with the same exact string, add &quot;File&quot; to the file with the same exact string, add <quote>File</quote> to
end of the option name, and change the definition to a string the end of the option name, and change the definition to a
pointing to the corresponding file; e.g. string pointing to the corresponding file; e.g.
<literal>services.gitlab.databasePassword = &quot;supersecurepassword&quot;</literal> <literal>services.gitlab.databasePassword = &quot;supersecurepassword&quot;</literal>
becomes becomes
<literal>services.gitlab.databasePasswordFile = &quot;/path/to/secret_file&quot;</literal> <literal>services.gitlab.databasePasswordFile = &quot;/path/to/secret_file&quot;</literal>
@ -791,7 +791,7 @@
<listitem> <listitem>
<para> <para>
The <literal>nodejs-11_x</literal> package has been removed as The <literal>nodejs-11_x</literal> package has been removed as
it's EOLed by upstream. its EOLed by upstream.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -961,7 +961,7 @@
from the upstream default <literal>speex-float-1</literal> to from the upstream default <literal>speex-float-1</literal> to
<literal>speex-float-5</literal>. Be aware that low-powered <literal>speex-float-5</literal>. Be aware that low-powered
ARM-based and MIPS-based boards will struggle with this so ARM-based and MIPS-based boards will struggle with this so
you'll need to set youll need to set
<literal>hardware.pulseaudio.daemon.config.resample-method</literal> <literal>hardware.pulseaudio.daemon.config.resample-method</literal>
back to <literal>speex-float-1</literal>. back to <literal>speex-float-1</literal>.
</para> </para>
@ -1004,7 +1004,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
It's now possible to change configuration in Its now possible to change configuration in
<link xlink:href="options.html#opt-services.nextcloud.enable">services.nextcloud</link> <link xlink:href="options.html#opt-services.nextcloud.enable">services.nextcloud</link>
after the initial deploy since all config parameters are after the initial deploy since all config parameters are
persisted in an additional config file generated by the persisted in an additional config file generated by the
@ -1178,7 +1178,7 @@
<link xlink:href="https://ceph.com/releases/v14-2-0-nautilus-released/">release <link xlink:href="https://ceph.com/releases/v14-2-0-nautilus-released/">release
notes</link> for details. The mgr dashboard as well as osds notes</link> for details. The mgr dashboard as well as osds
backed by loop-devices is no longer explicitly supported by backed by loop-devices is no longer explicitly supported by
the package and module. Note: There's been some issues with the package and module. Note: Theres been some issues with
python-cherrypy, which is used by the dashboard and prometheus python-cherrypy, which is used by the dashboard and prometheus
mgr modules (and possibly others), hence mgr modules (and possibly others), hence
0000-dont-check-cherrypy-version.patch. 0000-dont-check-cherrypy-version.patch.

View File

@ -73,7 +73,7 @@
<listitem> <listitem>
<para> <para>
The graphical installer image starts the graphical session The graphical installer image starts the graphical session
automatically. Before you'd be greeted by a tty and asked to automatically. Before youd be greeted by a tty and asked to
enter <literal>systemctl start display-manager</literal>. It enter <literal>systemctl start display-manager</literal>. It
is now possible to disable the display-manager from running by is now possible to disable the display-manager from running by
selecting the <literal>Disable display-manager</literal> quirk selecting the <literal>Disable display-manager</literal> quirk
@ -93,7 +93,7 @@
<link xlink:href="options.html#opt-services.xserver.desktopManager.pantheon.enable">services.xserver.desktopManager.pantheon.enable</link>, <link xlink:href="options.html#opt-services.xserver.desktopManager.pantheon.enable">services.xserver.desktopManager.pantheon.enable</link>,
we now default to also use we now default to also use
<link xlink:href="https://blog.elementary.io/say-hello-to-the-new-greeter/"> <link xlink:href="https://blog.elementary.io/say-hello-to-the-new-greeter/">
Pantheon's newly designed greeter </link>. Contrary to NixOS's Pantheons newly designed greeter </link>. Contrary to NixOSs
usual update policy, Pantheon will receive updates during the usual update policy, Pantheon will receive updates during the
cycle of NixOS 20.03 when backwards compatible. cycle of NixOS 20.03 when backwards compatible.
</para> </para>
@ -133,7 +133,7 @@
option to improve support for upstream session files. If you option to improve support for upstream session files. If you
used something like: used something like:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.xserver.desktopManager.default = &quot;xfce&quot;; services.xserver.desktopManager.default = &quot;xfce&quot;;
services.xserver.windowManager.default = &quot;icewm&quot;; services.xserver.windowManager.default = &quot;icewm&quot;;
@ -142,7 +142,7 @@
<para> <para>
you should change it to: you should change it to:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.xserver.displayManager.defaultSession = &quot;xfce+icewm&quot;; services.xserver.displayManager.defaultSession = &quot;xfce+icewm&quot;;
} }
@ -196,7 +196,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
UPower's configuration is now managed by NixOS and can be UPowers configuration is now managed by NixOS and can be
customized via <literal>services.upower</literal>. customized via <literal>services.upower</literal>.
</para> </para>
</listitem> </listitem>
@ -505,7 +505,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
<link xlink:href="https://github.com/NixOS/nixpkgs/pull/71106">#71106</link>. <link xlink:href="https://github.com/NixOS/nixpkgs/pull/71106">#71106</link>.
</para> </para>
<para> <para>
We already don't support the global We already dont support the global
<link xlink:href="options.html#opt-networking.useDHCP">networking.useDHCP</link>, <link xlink:href="options.html#opt-networking.useDHCP">networking.useDHCP</link>,
<link xlink:href="options.html#opt-networking.defaultGateway">networking.defaultGateway</link> <link xlink:href="options.html#opt-networking.defaultGateway">networking.defaultGateway</link>
and and
@ -522,7 +522,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
The stdenv now runs all bash with <literal>set -u</literal>, The stdenv now runs all bash with <literal>set -u</literal>,
to catch the use of undefined variables. Before, it itself to catch the use of undefined variables. Before, it itself
used <literal>set -u</literal> but was careful to unset it so used <literal>set -u</literal> but was careful to unset it so
other packages' code ran as before. Now, all bash code is held other packages code ran as before. Now, all bash code is held
to the same high standard, and the rather complex stateful to the same high standard, and the rather complex stateful
manipulation of the options can be discarded. manipulation of the options can be discarded.
</para> </para>
@ -558,7 +558,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
<literal>xfceUnstable</literal> all now point to the latest <literal>xfceUnstable</literal> all now point to the latest
Xfce 4.14 packages. And in the future NixOS releases will be Xfce 4.14 packages. And in the future NixOS releases will be
the latest released version of Xfce available at the time of the latest released version of Xfce available at the time of
the release's development (if viable). the releases development (if viable).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -662,7 +662,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
<listitem> <listitem>
<para> <para>
The <literal>dump1090</literal> derivation has been changed to The <literal>dump1090</literal> derivation has been changed to
use FlightAware's dump1090 as its upstream. However, this use FlightAwares dump1090 as its upstream. However, this
version does not have an internal webserver anymore. The version does not have an internal webserver anymore. The
assets in the <literal>share/dump1090</literal> directory of assets in the <literal>share/dump1090</literal> directory of
the derivation can be used in conjunction with an external the derivation can be used in conjunction with an external
@ -821,7 +821,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
is a <literal>loaOf</literal> option that is commonly used as is a <literal>loaOf</literal> option that is commonly used as
follows: follows:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
users.users = users.users =
[ { name = &quot;me&quot;; [ { name = &quot;me&quot;;
@ -836,7 +836,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
value of <literal>name</literal> as the name of the attribute value of <literal>name</literal> as the name of the attribute
set: set:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
users.users.me = users.users.me =
{ description = &quot;My personal user.&quot;; { description = &quot;My personal user.&quot;;
@ -890,7 +890,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
<listitem> <listitem>
<para> <para>
The<literal>services.buildkite-agent.openssh.publicKeyPath</literal> The<literal>services.buildkite-agent.openssh.publicKeyPath</literal>
option has been removed, as it's not necessary to deploy option has been removed, as its not necessary to deploy
public keys to clone private repositories. public keys to clone private repositories.
</para> </para>
</listitem> </listitem>
@ -932,7 +932,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
The <literal>services.xserver.displayManager.auto</literal> The <literal>services.xserver.displayManager.auto</literal>
module has been removed. It was only intended for use in module has been removed. It was only intended for use in
internal NixOS tests, and gave the false impression of it internal NixOS tests, and gave the false impression of it
being a special display manager when it's actually LightDM. being a special display manager when its actually LightDM.
Please use the Please use the
<literal>services.xserver.displayManager.lightdm.autoLogin</literal> <literal>services.xserver.displayManager.lightdm.autoLogin</literal>
options instead, or any other display manager in NixOS as they options instead, or any other display manager in NixOS as they
@ -940,7 +940,7 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
because it permitted root auto-login you can override the because it permitted root auto-login you can override the
lightdm-autologin pam module like: lightdm-autologin pam module like:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
security.pam.services.lightdm-autologin.text = lib.mkForce '' security.pam.services.lightdm-autologin.text = lib.mkForce ''
auth requisite pam_nologin.so auth requisite pam_nologin.so
@ -962,13 +962,13 @@ See https://github.com/NixOS/nixpkgs/pull/71684 for details.
auth required pam_succeed_if.so quiet auth required pam_succeed_if.so quiet
</programlisting> </programlisting>
<para> <para>
line, where default it's: line, where default its:
</para> </para>
<programlisting> <programlisting>
auth required pam_succeed_if.so uid &gt;= 1000 quiet auth required pam_succeed_if.so uid &gt;= 1000 quiet
</programlisting> </programlisting>
<para> <para>
not permitting users with uid's below 1000 (like root). All not permitting users with uids below 1000 (like root). All
other display managers in NixOS are configured like this. other display managers in NixOS are configured like this.
</para> </para>
</listitem> </listitem>
@ -1004,7 +1004,7 @@ auth required pam_succeed_if.so quiet
Additionally, some Postfix configuration must now be set Additionally, some Postfix configuration must now be set
manually instead of automatically by the Mailman module: manually instead of automatically by the Mailman module:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.postfix.relayDomains = [ &quot;hash:/var/lib/mailman/data/postfix_domains&quot; ]; services.postfix.relayDomains = [ &quot;hash:/var/lib/mailman/data/postfix_domains&quot; ];
services.postfix.config.transport_maps = [ &quot;hash:/var/lib/mailman/data/postfix_lmtp&quot; ]; services.postfix.config.transport_maps = [ &quot;hash:/var/lib/mailman/data/postfix_lmtp&quot; ];
@ -1051,14 +1051,14 @@ auth required pam_succeed_if.so quiet
<listitem> <listitem>
<para> <para>
The <literal>*psu</literal> versions of oraclejdk8 have been The <literal>*psu</literal> versions of oraclejdk8 have been
removed as they aren't provided by upstream anymore. removed as they arent provided by upstream anymore.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The <literal>services.dnscrypt-proxy</literal> module has been The <literal>services.dnscrypt-proxy</literal> module has been
removed as it used the deprecated version of dnscrypt-proxy. removed as it used the deprecated version of dnscrypt-proxy.
We've added Weve added
<link xlink:href="options.html#opt-services.dnscrypt-proxy2.enable">services.dnscrypt-proxy2.enable</link> <link xlink:href="options.html#opt-services.dnscrypt-proxy2.enable">services.dnscrypt-proxy2.enable</link>
to use the supported version. This module supports to use the supported version. This module supports
configuration via the Nix attribute set configuration via the Nix attribute set
@ -1066,7 +1066,7 @@ auth required pam_succeed_if.so quiet
or by passing a TOML configuration file via or by passing a TOML configuration file via
<link xlink:href="options.html#opt-services.dnscrypt-proxy2.configFile">services.dnscrypt-proxy2.configFile</link>. <link xlink:href="options.html#opt-services.dnscrypt-proxy2.configFile">services.dnscrypt-proxy2.configFile</link>.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
# Example configuration: # Example configuration:
services.dnscrypt-proxy2.enable = true; services.dnscrypt-proxy2.enable = true;
@ -1093,7 +1093,7 @@ auth required pam_succeed_if.so quiet
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
sqldeveloper_18 has been removed as it's not maintained sqldeveloper_18 has been removed as its not maintained
anymore, sqldeveloper has been updated to version anymore, sqldeveloper has been updated to version
<literal>19.4</literal>. Please note that this means that this <literal>19.4</literal>. Please note that this means that this
means that the oraclejdk is now required. For further means that the oraclejdk is now required. For further
@ -1110,7 +1110,7 @@ auth required pam_succeed_if.so quiet
the different lists of dependencies mashed together as one big the different lists of dependencies mashed together as one big
list, and then partitioning into Haskell and non-Hakell list, and then partitioning into Haskell and non-Hakell
dependencies, they work from the original many different dependencies, they work from the original many different
dependency parameters and don't need to algorithmically dependency parameters and dont need to algorithmically
partition anything. partition anything.
</para> </para>
<para> <para>
@ -1123,7 +1123,7 @@ auth required pam_succeed_if.so quiet
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The gcc-snapshot-package has been removed. It's marked as The gcc-snapshot-package has been removed. Its marked as
broken for &gt;2 years and used to point to a fairly old broken for &gt;2 years and used to point to a fairly old
snapshot from the gcc7-branch. snapshot from the gcc7-branch.
</para> </para>
@ -1158,7 +1158,7 @@ auth required pam_succeed_if.so quiet
<listitem> <listitem>
<para> <para>
nextcloud has been updated to <literal>v18.0.2</literal>. This nextcloud has been updated to <literal>v18.0.2</literal>. This
means that users from NixOS 19.09 can't upgrade directly since means that users from NixOS 19.09 cant upgrade directly since
you can only move one version forward and 19.09 uses you can only move one version forward and 19.09 uses
<literal>v16.0.8</literal>. <literal>v16.0.8</literal>.
</para> </para>
@ -1181,7 +1181,7 @@ auth required pam_succeed_if.so quiet
Existing setups will be detected using Existing setups will be detected using
<link xlink:href="options.html#opt-system.stateVersion">system.stateVersion</link>: <link xlink:href="options.html#opt-system.stateVersion">system.stateVersion</link>:
by default, nextcloud17 will be used, but will raise a by default, nextcloud17 will be used, but will raise a
warning which notes that after that deploy it's warning which notes that after that deploy its
recommended to update to the latest stable version recommended to update to the latest stable version
(nextcloud18) by declaring the newly introduced setting (nextcloud18) by declaring the newly introduced setting
<link xlink:href="options.html#opt-services.nextcloud.package">services.nextcloud.package</link>. <link xlink:href="options.html#opt-services.nextcloud.package">services.nextcloud.package</link>.
@ -1194,7 +1194,7 @@ auth required pam_succeed_if.so quiet
get an evaluation error by default. This is done to ensure get an evaluation error by default. This is done to ensure
that our that our
<link xlink:href="options.html#opt-services.nextcloud.package">package</link>-option <link xlink:href="options.html#opt-services.nextcloud.package">package</link>-option
doesn't select an older version by accident. It's doesnt select an older version by accident. Its
recommended to use pkgs.nextcloud18 or to set recommended to use pkgs.nextcloud18 or to set
<link xlink:href="options.html#opt-services.nextcloud.package">package</link> <link xlink:href="options.html#opt-services.nextcloud.package">package</link>
to pkgs.nextcloud explicitly. to pkgs.nextcloud explicitly.
@ -1203,7 +1203,7 @@ auth required pam_succeed_if.so quiet
</itemizedlist> </itemizedlist>
<warning> <warning>
<para> <para>
Please note that if you're coming from Please note that if youre coming from
<literal>19.03</literal> or older, you have to manually <literal>19.03</literal> or older, you have to manually
upgrade to <literal>19.09</literal> first to upgrade your upgrade to <literal>19.09</literal> first to upgrade your
server to Nextcloud v16. server to Nextcloud v16.
@ -1215,7 +1215,7 @@ auth required pam_succeed_if.so quiet
Hydra has gained a massive performance improvement due to Hydra has gained a massive performance improvement due to
<link xlink:href="https://github.com/NixOS/hydra/pull/710">some <link xlink:href="https://github.com/NixOS/hydra/pull/710">some
database schema changes</link> by adding several IDs and database schema changes</link> by adding several IDs and
better indexing. However, it's necessary to upgrade Hydra in better indexing. However, its necessary to upgrade Hydra in
multiple steps: multiple steps:
</para> </para>
<itemizedlist> <itemizedlist>
@ -1229,7 +1229,7 @@ auth required pam_succeed_if.so quiet
when upgrading. Otherwise, the package can be deployed when upgrading. Otherwise, the package can be deployed
using the following config: using the following config:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ pkgs, ... }: { { pkgs, ... }: {
services.hydra.package = pkgs.hydra-migration; services.hydra.package = pkgs.hydra-migration;
} }
@ -1266,12 +1266,12 @@ $ hydra-backfill-ids
<link xlink:href="options.html#opt-system.stateVersion">stateVersion</link> <link xlink:href="options.html#opt-system.stateVersion">stateVersion</link>
is set to <literal>20.03</literal> or greater, is set to <literal>20.03</literal> or greater,
hydra-unstable will be used automatically! This will break hydra-unstable will be used automatically! This will break
your setup if you didn't run the migration. your setup if you didnt run the migration.
</para> </para>
</warning> </warning>
<para> <para>
Please note that Hydra is currently not available with Please note that Hydra is currently not available with
nixStable as this doesn't compile anymore. nixStable as this doesnt compile anymore.
</para> </para>
<warning> <warning>
<para> <para>
@ -1281,7 +1281,7 @@ $ hydra-backfill-ids
assertion error will be thrown. To circumvent this, you need assertion error will be thrown. To circumvent this, you need
to set to set
<link xlink:href="options.html#opt-services.hydra.package">services.hydra.package</link> <link xlink:href="options.html#opt-services.hydra.package">services.hydra.package</link>
to pkgs.hydra explicitly and make sure you know what you're to pkgs.hydra explicitly and make sure you know what youre
doing! doing!
</para> </para>
</warning> </warning>
@ -1319,7 +1319,7 @@ $ hydra-backfill-ids
<para> <para>
To continue to use the old approach, you can configure: To continue to use the old approach, you can configure:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.nginx.appendConfig = let cfg = config.services.nginx; in ''user ${cfg.user} ${cfg.group};''; services.nginx.appendConfig = let cfg = config.services.nginx; in ''user ${cfg.user} ${cfg.group};'';
systemd.services.nginx.serviceConfig.User = lib.mkForce &quot;root&quot;; systemd.services.nginx.serviceConfig.User = lib.mkForce &quot;root&quot;;
@ -1413,14 +1413,14 @@ $ hydra-backfill-ids
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
If you use <literal>sqlite3</literal> you don't need to do If you use <literal>sqlite3</literal> you dont need to do
anything. anything.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
If you use <literal>postgresql</literal> on a different If you use <literal>postgresql</literal> on a different
server, you don't need to change anything as well since server, you dont need to change anything as well since
this module was never designed to configure remote this module was never designed to configure remote
databases. databases.
</para> </para>
@ -1432,7 +1432,7 @@ $ hydra-backfill-ids
older, you simply need to enable postgresql-support older, you simply need to enable postgresql-support
explicitly: explicitly:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ ... }: { { ... }: {
services.matrix-synapse = { services.matrix-synapse = {
enable = true; enable = true;
@ -1460,7 +1460,7 @@ $ hydra-backfill-ids
<literal>nixos-unstable</literal> <emphasis>after</emphasis> <literal>nixos-unstable</literal> <emphasis>after</emphasis>
the <literal>19.09</literal>-release, your database is the <literal>19.09</literal>-release, your database is
misconfigured due to a regression in NixOS. For now, misconfigured due to a regression in NixOS. For now,
matrix-synapse will startup with a warning, but it's matrix-synapse will startup with a warning, but its
recommended to reconfigure the database to set the values recommended to reconfigure the database to set the values
<literal>LC_COLLATE</literal> and <literal>LC_CTYPE</literal> <literal>LC_COLLATE</literal> and <literal>LC_CTYPE</literal>
to to
@ -1473,7 +1473,7 @@ $ hydra-backfill-ids
<link xlink:href="options.html#opt-systemd.network.links">systemd.network.links</link> <link xlink:href="options.html#opt-systemd.network.links">systemd.network.links</link>
option is now respected even when option is now respected even when
<link xlink:href="options.html#opt-systemd.network.enable">systemd-networkd</link> <link xlink:href="options.html#opt-systemd.network.enable">systemd-networkd</link>
is disabled. This mirrors the behaviour of systemd - It's udev is disabled. This mirrors the behaviour of systemd - Its udev
that parses <literal>.link</literal> files, not that parses <literal>.link</literal> files, not
<literal>systemd-networkd</literal>. <literal>systemd-networkd</literal>.
</para> </para>
@ -1486,8 +1486,8 @@ $ hydra-backfill-ids
<para> <para>
Please note that mongodb has been relicensed under their own Please note that mongodb has been relicensed under their own
<link xlink:href="https://www.mongodb.com/licensing/server-side-public-license/faq"><literal> sspl</literal></link>-license. <link xlink:href="https://www.mongodb.com/licensing/server-side-public-license/faq"><literal> sspl</literal></link>-license.
Since it's not entirely free and not OSI-approved, it's Since its not entirely free and not OSI-approved, its
listed as non-free. This means that Hydra doesn't provide listed as non-free. This means that Hydra doesnt provide
prebuilt mongodb-packages and needs to be built locally. prebuilt mongodb-packages and needs to be built locally.
</para> </para>
</warning> </warning>

View File

@ -722,7 +722,7 @@
See See
<link xlink:href="https://mariadb.com/kb/en/authentication-from-mariadb-104/">Authentication <link xlink:href="https://mariadb.com/kb/en/authentication-from-mariadb-104/">Authentication
from MariaDB 10.4</link>. unix_socket auth plugin does not use from MariaDB 10.4</link>. unix_socket auth plugin does not use
a password, and uses the connecting user's UID instead. When a a password, and uses the connecting users UID instead. When a
new MariaDB data directory is initialized, two MariaDB users new MariaDB data directory is initialized, two MariaDB users
are created and can be used with new unix_socket auth plugin, are created and can be used with new unix_socket auth plugin,
as well as traditional mysql_native_password plugin: as well as traditional mysql_native_password plugin:
@ -730,7 +730,7 @@
traditional mysql_native_password plugin method, one must run traditional mysql_native_password plugin method, one must run
the following: the following:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.mysql.initialScript = pkgs.writeText &quot;mariadb-init.sql&quot; '' services.mysql.initialScript = pkgs.writeText &quot;mariadb-init.sql&quot; ''
ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD(&quot;verysecret&quot;); ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD(&quot;verysecret&quot;);
@ -755,7 +755,7 @@ services.mysql.initialScript = pkgs.writeText &quot;mariadb-init.sql&quot; ''
allow MySQL to read from /home and /tmp directories when using allow MySQL to read from /home and /tmp directories when using
<literal>LOAD DATA INFILE</literal> <literal>LOAD DATA INFILE</literal>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
systemd.services.mysql.serviceConfig.ProtectHome = lib.mkForce &quot;read-only&quot;; systemd.services.mysql.serviceConfig.ProtectHome = lib.mkForce &quot;read-only&quot;;
} }
@ -766,7 +766,7 @@ services.mysql.initialScript = pkgs.writeText &quot;mariadb-init.sql&quot; ''
<literal>SELECT * INTO OUTFILE</literal>, assuming the mysql <literal>SELECT * INTO OUTFILE</literal>, assuming the mysql
user has write access to <literal>/var/data</literal> user has write access to <literal>/var/data</literal>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
systemd.services.mysql.serviceConfig.ReadWritePaths = [ &quot;/var/data&quot; ]; systemd.services.mysql.serviceConfig.ReadWritePaths = [ &quot;/var/data&quot; ];
} }
@ -864,7 +864,7 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
<para> <para>
<literal>buildGoModule</literal> now internally creates a <literal>buildGoModule</literal> now internally creates a
vendor directory in the source tree for downloaded modules vendor directory in the source tree for downloaded modules
instead of using go's instead of using gos
<link xlink:href="https://golang.org/cmd/go/#hdr-Module_proxy_protocol">module <link xlink:href="https://golang.org/cmd/go/#hdr-Module_proxy_protocol">module
proxy protocol</link>. This storage format is simpler and proxy protocol</link>. This storage format is simpler and
therefore less likely to break with future versions of go. As therefore less likely to break with future versions of go. As
@ -885,7 +885,7 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
<literal>phantomJsSupport = true</literal> to the package <literal>phantomJsSupport = true</literal> to the package
instantiation: instantiation:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.grafana.package = pkgs.grafana.overrideAttrs (oldAttrs: rec { services.grafana.package = pkgs.grafana.overrideAttrs (oldAttrs: rec {
phantomJsSupport = true; phantomJsSupport = true;
@ -941,24 +941,24 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
<para> <para>
If you used the If you used the
<literal>boot.initrd.network.ssh.host*Key</literal> options, <literal>boot.initrd.network.ssh.host*Key</literal> options,
you'll get an error explaining how to convert your host keys youll get an error explaining how to convert your host keys
and migrate to the new and migrate to the new
<literal>boot.initrd.network.ssh.hostKeys</literal> option. <literal>boot.initrd.network.ssh.hostKeys</literal> option.
Otherwise, if you don't have any host keys set, you'll need to Otherwise, if you dont have any host keys set, youll need to
generate some; see the <literal>hostKeys</literal> option generate some; see the <literal>hostKeys</literal> option
documentation for instructions. documentation for instructions.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Since this release there's an easy way to customize your PHP Since this release theres an easy way to customize your PHP
install to get a much smaller base PHP with only wanted install to get a much smaller base PHP with only wanted
extensions enabled. See the following snippet installing a extensions enabled. See the following snippet installing a
smaller PHP with the extensions <literal>imagick</literal>, smaller PHP with the extensions <literal>imagick</literal>,
<literal>opcache</literal>, <literal>pdo</literal> and <literal>opcache</literal>, <literal>pdo</literal> and
<literal>pdo_mysql</literal> loaded: <literal>pdo_mysql</literal> loaded:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
environment.systemPackages = [ environment.systemPackages = [
(pkgs.php.withExtensions (pkgs.php.withExtensions
@ -973,7 +973,7 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
} }
</programlisting> </programlisting>
<para> <para>
The default <literal>php</literal> attribute hasn't lost any The default <literal>php</literal> attribute hasnt lost any
extensions. The <literal>opcache</literal> extension has been extensions. The <literal>opcache</literal> extension has been
added. All upstream PHP extensions are available under added. All upstream PHP extensions are available under
php.extensions.&lt;name?&gt;. php.extensions.&lt;name?&gt;.
@ -997,7 +997,7 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
The remaining configuration flags can now be set directly on The remaining configuration flags can now be set directly on
the <literal>php</literal> attribute. For example, instead of the <literal>php</literal> attribute. For example, instead of
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
php.override { php.override {
config.php.embed = true; config.php.embed = true;
@ -1008,7 +1008,7 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
<para> <para>
you should now write you should now write
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
php.override { php.override {
embedSupport = true; embedSupport = true;
@ -1062,7 +1062,7 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
writing to other folders, use writing to other folders, use
<literal>systemd.services.nginx.serviceConfig.ReadWritePaths</literal> <literal>systemd.services.nginx.serviceConfig.ReadWritePaths</literal>
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
systemd.services.nginx.serviceConfig.ReadWritePaths = [ &quot;/var/www&quot; ]; systemd.services.nginx.serviceConfig.ReadWritePaths = [ &quot;/var/www&quot; ];
} }
@ -1076,7 +1076,7 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
docs</link> for details). If you require serving files from docs</link> for details). If you require serving files from
home directories, you may choose to set e.g. home directories, you may choose to set e.g.
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
systemd.services.nginx.serviceConfig.ProtectHome = &quot;read-only&quot;; systemd.services.nginx.serviceConfig.ProtectHome = &quot;read-only&quot;;
} }
@ -1093,7 +1093,7 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
<para> <para>
Replace a <literal>nesting.clone</literal> entry with: Replace a <literal>nesting.clone</literal> entry with:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
specialisation.example-sub-configuration = { specialisation.example-sub-configuration = {
configuration = { configuration = {
@ -1104,7 +1104,7 @@ WHERE table_schema = &quot;zabbix&quot; AND COLLATION_NAME = &quot;utf8_general_
<para> <para>
Replace a <literal>nesting.children</literal> entry with: Replace a <literal>nesting.children</literal> entry with:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
specialisation.example-sub-configuration = { specialisation.example-sub-configuration = {
inheritParentConfig = false; inheritParentConfig = false;
@ -1162,7 +1162,7 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
<para> <para>
The <literal>systemd-networkd</literal> option The <literal>systemd-networkd</literal> option
<literal>systemd.network.networks.&lt;name&gt;.dhcp.CriticalConnection</literal> <literal>systemd.network.networks.&lt;name&gt;.dhcp.CriticalConnection</literal>
has been removed following upstream systemd's deprecation of has been removed following upstream systemds deprecation of
the same. It is recommended to use the same. It is recommended to use
<literal>systemd.network.networks.&lt;name&gt;.networkConfig.KeepConfiguration</literal> <literal>systemd.network.networks.&lt;name&gt;.networkConfig.KeepConfiguration</literal>
instead. See systemd.network 5 for details. instead. See systemd.network 5 for details.
@ -1174,7 +1174,7 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
<literal>systemd.network.networks._name_.dhcpConfig</literal> <literal>systemd.network.networks._name_.dhcpConfig</literal>
has been renamed to has been renamed to
<link xlink:href="options.html#opt-systemd.network.networks._name_.dhcpV4Config">systemd.network.networks.<emphasis>name</emphasis>.dhcpV4Config</link> <link xlink:href="options.html#opt-systemd.network.networks._name_.dhcpV4Config">systemd.network.networks.<emphasis>name</emphasis>.dhcpV4Config</link>
following upstream systemd's documentation change. See following upstream systemds documentation change. See
systemd.network 5 for details. systemd.network 5 for details.
</para> </para>
</listitem> </listitem>
@ -1283,7 +1283,7 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
The The
<link xlink:href="https://github.com/okTurtles/dnschain">DNSChain</link> <link xlink:href="https://github.com/okTurtles/dnschain">DNSChain</link>
package and NixOS module have been removed from Nixpkgs as the package and NixOS module have been removed from Nixpkgs as the
software is unmaintained and can't be built. For more software is unmaintained and cant be built. For more
information see issue information see issue
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/89205">#89205</link>. <link xlink:href="https://github.com/NixOS/nixpkgs/issues/89205">#89205</link>.
</para> </para>
@ -1350,7 +1350,7 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Radicale's default package has changed from 2.x to 3.x. An Radicales default package has changed from 2.x to 3.x. An
upgrade checklist can be found upgrade checklist can be found
<link xlink:href="https://github.com/Kozea/Radicale/blob/3.0.x/NEWS.md#upgrade-checklist">here</link>. <link xlink:href="https://github.com/Kozea/Radicale/blob/3.0.x/NEWS.md#upgrade-checklist">here</link>.
You can use the newer version in the NixOS service by setting You can use the newer version in the NixOS service by setting
@ -1385,7 +1385,7 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
multi-instance config with an existing bitcoind data directory multi-instance config with an existing bitcoind data directory
and user, you have to adjust the original config, e.g.: and user, you have to adjust the original config, e.g.:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.bitcoind = { services.bitcoind = {
enable = true; enable = true;
@ -1397,7 +1397,7 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
<para> <para>
To something similar: To something similar:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.bitcoind.mainnet = { services.bitcoind.mainnet = {
enable = true; enable = true;
@ -1447,7 +1447,7 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
the original SSL settings, you have to adjust the original the original SSL settings, you have to adjust the original
config, e.g.: config, e.g.:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.dokuwiki = { services.dokuwiki = {
enable = true; enable = true;
@ -1458,7 +1458,7 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
<para> <para>
To something similar: To something similar:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.dokuwiki.&quot;mywiki&quot; = { services.dokuwiki.&quot;mywiki&quot; = {
enable = true; enable = true;
@ -1472,8 +1472,8 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
</programlisting> </programlisting>
<para> <para>
The base package has also been upgraded to the 2020-07-29 The base package has also been upgraded to the 2020-07-29
&quot;Hogfather&quot; release. Plugins might be incompatible <quote>Hogfather</quote> release. Plugins might be
or require upgrading. incompatible or require upgrading.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -1492,7 +1492,7 @@ $ sudo /run/current-system/fine-tune/child-1/bin/switch-to-configuration test
option is (<literal>/var/db/postgresql</literal>) and then option is (<literal>/var/db/postgresql</literal>) and then
explicitly set this value to maintain compatibility: explicitly set this value to maintain compatibility:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.postgresql.dataDir = &quot;/var/db/postgresql&quot;; services.postgresql.dataDir = &quot;/var/db/postgresql&quot;;
} }
@ -1587,7 +1587,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
<listitem> <listitem>
<para> <para>
The <literal>security.rngd</literal> service is now disabled The <literal>security.rngd</literal> service is now disabled
by default. This choice was made because there's krngd in the by default. This choice was made because theres krngd in the
linux kernel space making it (for most usecases) functionally linux kernel space making it (for most usecases) functionally
redundent. redundent.
</para> </para>
@ -1609,13 +1609,13 @@ CREATE ROLE postgres LOGIN SUPERUSER;
will be EOL (end of life) within the lifetime of 20.09</link>. will be EOL (end of life) within the lifetime of 20.09</link>.
</para> </para>
<para> <para>
It's necessary to upgrade to nextcloud19: Its necessary to upgrade to nextcloud19:
</para> </para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
From nextcloud17, you have to upgrade to nextcloud18 first From nextcloud17, you have to upgrade to nextcloud18 first
as Nextcloud doesn't allow going multiple major revisions as Nextcloud doesnt allow going multiple major revisions
forward in a single upgrade. This is possible by setting forward in a single upgrade. This is possible by setting
<link xlink:href="options.html#opt-services.nextcloud.package">services.nextcloud.package</link> <link xlink:href="options.html#opt-services.nextcloud.package">services.nextcloud.package</link>
to nextcloud18. to nextcloud18.
@ -1623,7 +1623,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
From nextcloud18, it's possible to directly upgrade to From nextcloud18, its possible to directly upgrade to
nextcloud19 by setting nextcloud19 by setting
<link xlink:href="options.html#opt-services.nextcloud.package">services.nextcloud.package</link> <link xlink:href="options.html#opt-services.nextcloud.package">services.nextcloud.package</link>
to nextcloud19. to nextcloud19.
@ -1685,7 +1685,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
<listitem> <listitem>
<para> <para>
The notmuch package moves its emacs-related binaries and emacs The notmuch package moves its emacs-related binaries and emacs
lisp files to a separate output. They're not part of the lisp files to a separate output. Theyre not part of the
default <literal>out</literal> output anymore - if you relied default <literal>out</literal> output anymore - if you relied
on the <literal>notmuch-emacs-mua</literal> binary or the on the <literal>notmuch-emacs-mua</literal> binary or the
emacs lisp files, access them via the emacs lisp files, access them via the
@ -1736,11 +1736,11 @@ CREATE ROLE postgres LOGIN SUPERUSER;
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The cc- and binutils-wrapper's &quot;infix salt&quot; and The cc- and binutils-wrappers <quote>infix salt</quote> and
<literal>_BUILD_</literal> and <literal>_TARGET_</literal> <literal>_BUILD_</literal> and <literal>_TARGET_</literal>
user infixes have been replaced with with a &quot;suffix user infixes have been replaced with with a <quote>suffix
salt&quot; and suffixes and <literal>_FOR_BUILD</literal> and salt</quote> and suffixes and <literal>_FOR_BUILD</literal>
<literal>_FOR_TARGET</literal>. This matches the autotools and <literal>_FOR_TARGET</literal>. This matches the autotools
convention for env vars which standard for these things, convention for env vars which standard for these things,
making interfacing with other tools easier. making interfacing with other tools easier.
</para> </para>
@ -1774,8 +1774,8 @@ CREATE ROLE postgres LOGIN SUPERUSER;
<literal>network-link-*</literal> units, which have been <literal>network-link-*</literal> units, which have been
removed. Bringing the interface up has been moved to the removed. Bringing the interface up has been moved to the
beginning of the <literal>network-addresses-*</literal> unit. beginning of the <literal>network-addresses-*</literal> unit.
Note this doesn't require <literal>systemd-networkd</literal> Note this doesnt require <literal>systemd-networkd</literal>
- it's udev that parses <literal>.link</literal> files. Extra - its udev that parses <literal>.link</literal> files. Extra
care needs to be taken in the presence of care needs to be taken in the presence of
<link xlink:href="https://wiki.debian.org/NetworkInterfaceNames#THE_.22PERSISTENT_NAMES.22_SCHEME">legacy <link xlink:href="https://wiki.debian.org/NetworkInterfaceNames#THE_.22PERSISTENT_NAMES.22_SCHEME">legacy
udev rules</link> to rename interfaces, as MAC Address and MTU udev rules</link> to rename interfaces, as MAC Address and MTU
@ -1825,7 +1825,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
you must include those directories into the you must include those directories into the
<literal>BindPaths</literal> of the service: <literal>BindPaths</literal> of the service:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
systemd.services.transmission.serviceConfig.BindPaths = [ &quot;/path/to/alternative/download-dir&quot; ]; systemd.services.transmission.serviceConfig.BindPaths = [ &quot;/path/to/alternative/download-dir&quot; ];
} }
@ -1835,7 +1835,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
<literal>transmission-daemon</literal> is now only available <literal>transmission-daemon</literal> is now only available
on the local network interface by default. Use: on the local network interface by default. Use:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.transmission.settings.rpc-bind-address = &quot;0.0.0.0&quot;; services.transmission.settings.rpc-bind-address = &quot;0.0.0.0&quot;;
} }
@ -1850,7 +1850,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
With this release <literal>systemd-networkd</literal> (when With this release <literal>systemd-networkd</literal> (when
enabled through enabled through
<link xlink:href="options.html#opt-networking.useNetworkd">networking.useNetworkd</link>) <link xlink:href="options.html#opt-networking.useNetworkd">networking.useNetworkd</link>)
has it's netlink socket created through a has its netlink socket created through a
<literal>systemd.socket</literal> unit. This gives us control <literal>systemd.socket</literal> unit. This gives us control
over socket buffer sizes and other parameters. For larger over socket buffer sizes and other parameters. For larger
setups where networkd has to create a lot of (virtual) devices setups where networkd has to create a lot of (virtual) devices
@ -1873,7 +1873,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
</para> </para>
<para> <para>
Since the actual memory requirements depend on hardware, Since the actual memory requirements depend on hardware,
timing, exact configurations etc. it isn't currently possible timing, exact configurations etc. it isnt currently possible
to infer a good default from within the NixOS module system. to infer a good default from within the NixOS module system.
Administrators are advised to monitor the logs of Administrators are advised to monitor the logs of
<literal>systemd-networkd</literal> for <literal>systemd-networkd</literal> for
@ -1882,7 +1882,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
</para> </para>
<para> <para>
Note: Increasing the <literal>ReceiveBufferSize=</literal> Note: Increasing the <literal>ReceiveBufferSize=</literal>
doesn't allocate any memory. It just increases the upper bound doesnt allocate any memory. It just increases the upper bound
on the kernel side. The memory allocation depends on the on the kernel side. The memory allocation depends on the
amount of messages that are queued on the kernel side of the amount of messages that are queued on the kernel side of the
netlink socket. netlink socket.
@ -1900,7 +1900,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
<para> <para>
This means that a configuration like this This means that a configuration like this
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.dovecot2.mailboxes = [ services.dovecot2.mailboxes = [
{ name = &quot;Junk&quot;; { name = &quot;Junk&quot;;
@ -1912,7 +1912,7 @@ CREATE ROLE postgres LOGIN SUPERUSER;
<para> <para>
should now look like this: should now look like this:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.dovecot2.mailboxes = { services.dovecot2.mailboxes = {
Junk.auto = &quot;create&quot;; Junk.auto = &quot;create&quot;;
@ -1934,8 +1934,8 @@ CREATE ROLE postgres LOGIN SUPERUSER;
</para> </para>
<para> <para>
If you have an existing installation, please make sure that If you have an existing installation, please make sure that
you're on nextcloud18 before upgrading to nextcloud19 since youre on nextcloud18 before upgrading to nextcloud19 since
Nextcloud doesn't support upgrades across multiple major Nextcloud doesnt support upgrades across multiple major
versions. versions.
</para> </para>
</listitem> </listitem>

View File

@ -235,9 +235,9 @@
<para> <para>
The <literal>networking.wireless.iwd</literal> module now The <literal>networking.wireless.iwd</literal> module now
installs the upstream-provided 80-iwd.link file, which sets installs the upstream-provided 80-iwd.link file, which sets
the NamePolicy= for all wlan devices to &quot;keep the NamePolicy= for all wlan devices to <quote>keep
kernel&quot;, to avoid race conditions between iwd and kernel</quote>, to avoid race conditions between iwd and
networkd. If you don't want this, you can set networkd. If you dont want this, you can set
<literal>systemd.network.links.&quot;80-iwd&quot; = lib.mkForce {}</literal>. <literal>systemd.network.links.&quot;80-iwd&quot; = lib.mkForce {}</literal>.
</para> </para>
</listitem> </listitem>
@ -245,7 +245,7 @@
<para> <para>
<literal>rubyMinimal</literal> was removed due to being unused <literal>rubyMinimal</literal> was removed due to being unused
and unusable. The default ruby interpreter includes JIT and unusable. The default ruby interpreter includes JIT
support, which makes it reference it's compiler. Since JIT support, which makes it reference its compiler. Since JIT
support is probably needed by some Gems, it was decided to support is probably needed by some Gems, it was decided to
enable this feature with all cc references by default, and enable this feature with all cc references by default, and
allow to build a Ruby derivation without references to cc, by allow to build a Ruby derivation without references to cc, by
@ -330,7 +330,7 @@
<literal>mediatomb</literal> package. If you want to keep the <literal>mediatomb</literal> package. If you want to keep the
old behavior, you must declare it with: old behavior, you must declare it with:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.mediatomb.package = pkgs.mediatomb; services.mediatomb.package = pkgs.mediatomb;
} }
@ -341,7 +341,7 @@
service declaration to add the firewall rules itself before, service declaration to add the firewall rules itself before,
you should now declare it with: you should now declare it with:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.mediatomb.openFirewall = true; services.mediatomb.openFirewall = true;
} }
@ -368,7 +368,7 @@
<link xlink:href="options.html#opt-services.uwsgi.capabilities">services.uwsgi.capabilities</link>. <link xlink:href="options.html#opt-services.uwsgi.capabilities">services.uwsgi.capabilities</link>.
The previous behaviour can be restored by setting: The previous behaviour can be restored by setting:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.uwsgi.user = &quot;root&quot;; services.uwsgi.user = &quot;root&quot;;
services.uwsgi.group = &quot;root&quot;; services.uwsgi.group = &quot;root&quot;;
@ -427,7 +427,7 @@
<para> <para>
<link xlink:href="options.html#opt-networking.wireguard.interfaces">networking.wireguard.interfaces.&lt;name&gt;.generatePrivateKeyFile</link>, <link xlink:href="options.html#opt-networking.wireguard.interfaces">networking.wireguard.interfaces.&lt;name&gt;.generatePrivateKeyFile</link>,
which is off by default, had a <literal>chmod</literal> race which is off by default, had a <literal>chmod</literal> race
condition fixed. As an aside, the parent directory's condition fixed. As an aside, the parent directorys
permissions were widened, and the key files were made permissions were widened, and the key files were made
owner-writable. This only affects newly created keys. However, owner-writable. This only affects newly created keys. However,
if the exact permissions are important for your setup, read if the exact permissions are important for your setup, read
@ -527,7 +527,7 @@ $ slapcat -F $TMPDIR -n0 -H 'ldap:///???(!(objectClass=olcSchemaConfig))'
this directory are guarded to only run if the files they this directory are guarded to only run if the files they
want to manipulate do not already exist, and so will not want to manipulate do not already exist, and so will not
re-apply their changes if the IMDS response changes. re-apply their changes if the IMDS response changes.
Examples: <literal>root</literal>'s SSH key is only added if Examples: <literal>root</literal>s SSH key is only added if
<literal>/root/.ssh/authorized_keys</literal> does not <literal>/root/.ssh/authorized_keys</literal> does not
exist, and SSH host keys are only set from user data if they exist, and SSH host keys are only set from user data if they
do not exist in <literal>/etc/ssh</literal>. do not exist in <literal>/etc/ssh</literal>.
@ -550,9 +550,9 @@ $ slapcat -F $TMPDIR -n0 -H 'ldap:///???(!(objectClass=olcSchemaConfig))'
configures Privoxy, and the configures Privoxy, and the
<literal>services.tor.client.privoxy.enable</literal> option <literal>services.tor.client.privoxy.enable</literal> option
has been removed. To enable Privoxy, and to configure it to has been removed. To enable Privoxy, and to configure it to
use Tor's faster port, use the following configuration: use Tors faster port, use the following configuration:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
opt-services.privoxy.enable = true; opt-services.privoxy.enable = true;
opt-services.privoxy.enableTor = true; opt-services.privoxy.enableTor = true;
@ -628,7 +628,7 @@ $ slapcat -F $TMPDIR -n0 -H 'ldap:///???(!(objectClass=olcSchemaConfig))'
exporter no longer accepts a fixed command-line parameter to exporter no longer accepts a fixed command-line parameter to
specify the URL of the endpoint serving JSON. It now expects specify the URL of the endpoint serving JSON. It now expects
this URL to be passed as an URL parameter, when scraping the this URL to be passed as an URL parameter, when scraping the
exporter's <literal>/probe</literal> endpoint. In the exporters <literal>/probe</literal> endpoint. In the
prometheus scrape configuration the scrape target might look prometheus scrape configuration the scrape target might look
like this: like this:
</para> </para>
@ -689,7 +689,7 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e
<literal>mpich</literal> instead of the default <literal>mpich</literal> instead of the default
<literal>openmpi</literal> can now be achived like this: <literal>openmpi</literal> can now be achived like this:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
self: super: self: super:
{ {
mpi = super.mpich; mpi = super.mpich;
@ -790,7 +790,7 @@ self: super:
for any device that the kernel recognises as an hardware RNG, for any device that the kernel recognises as an hardware RNG,
as it will automatically run the krngd task to periodically as it will automatically run the krngd task to periodically
collect random data from the device and mix it into the collect random data from the device and mix it into the
kernel's RNG. kernels RNG.
</para> </para>
<para> <para>
The default SMTP port for GitLab has been changed to The default SMTP port for GitLab has been changed to
@ -850,7 +850,7 @@ self: super:
kodiPackages.inputstream-adaptive and kodiPackages.vfs-sftp kodiPackages.inputstream-adaptive and kodiPackages.vfs-sftp
addons: addons:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
environment.systemPackages = [ environment.systemPackages = [
pkgs.kodi pkgs.kodi
@ -867,7 +867,7 @@ self: super:
and as a result the above configuration should now be written and as a result the above configuration should now be written
as: as:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
environment.systemPackages = [ environment.systemPackages = [
(pkgs.kodi.withPackages (p: with p; [ (pkgs.kodi.withPackages (p: with p; [
@ -893,7 +893,7 @@ self: super:
<literal>services.minio.dataDir</literal> changed type to a <literal>services.minio.dataDir</literal> changed type to a
list of paths, required for specifiyng multiple data list of paths, required for specifiyng multiple data
directories for using with erasure coding. Currently, the directories for using with erasure coding. Currently, the
service doesn't enforce nor checks the correct number of paths service doesnt enforce nor checks the correct number of paths
to correspond to minio requirements. to correspond to minio requirements.
</para> </para>
</listitem> </listitem>
@ -910,7 +910,7 @@ self: super:
<literal>dvorak-programmer</literal> in <literal>dvorak-programmer</literal> in
<literal>console.keyMap</literal> now instead of <literal>console.keyMap</literal> now instead of
<literal>dvp</literal>. In <literal>dvp</literal>. In
<literal>services.xserver.xkbVariant</literal> it's still <literal>services.xserver.xkbVariant</literal> its still
<literal>dvp</literal>. <literal>dvp</literal>.
</para> </para>
</listitem> </listitem>
@ -954,7 +954,7 @@ self: super:
supported. supported.
</para> </para>
<para> <para>
Furthermore, Radicale's systemd unit was hardened which might Furthermore, Radicales systemd unit was hardened which might
break some deployments. In particular, a non-default break some deployments. In particular, a non-default
<literal>filesystem_folder</literal> has to be added to <literal>filesystem_folder</literal> has to be added to
<literal>systemd.services.radicale.serviceConfig.ReadWritePaths</literal> <literal>systemd.services.radicale.serviceConfig.ReadWritePaths</literal>
@ -991,7 +991,7 @@ self: super:
<listitem> <listitem>
<para> <para>
<link xlink:href="https://www.gnuradio.org/">GNURadio</link> <link xlink:href="https://www.gnuradio.org/">GNURadio</link>
has a <literal>pkgs</literal> attribute set, and there's a has a <literal>pkgs</literal> attribute set, and theres a
<literal>gnuradio.callPackage</literal> function that extends <literal>gnuradio.callPackage</literal> function that extends
<literal>pkgs</literal> with a <literal>pkgs</literal> with a
<literal>mkDerivation</literal>, and a <literal>mkDerivation</literal>, and a
@ -1027,7 +1027,7 @@ self: super:
<listitem> <listitem>
<para> <para>
<link xlink:href="https://kodi.tv/">Kodi</link> has been <link xlink:href="https://kodi.tv/">Kodi</link> has been
updated to version 19.1 &quot;Matrix&quot;. See the updated to version 19.1 <quote>Matrix</quote>. See the
<link xlink:href="https://kodi.tv/article/kodi-19-0-matrix-release">announcement</link> <link xlink:href="https://kodi.tv/article/kodi-19-0-matrix-release">announcement</link>
for further details. for further details.
</para> </para>
@ -1098,9 +1098,9 @@ self: super:
<listitem> <listitem>
<para> <para>
The default-version of <literal>nextcloud</literal> is The default-version of <literal>nextcloud</literal> is
nextcloud21. Please note that it's <emphasis>not</emphasis> nextcloud21. Please note that its <emphasis>not</emphasis>
possible to upgrade <literal>nextcloud</literal> across possible to upgrade <literal>nextcloud</literal> across
multiple major versions! This means that it's e.g. not multiple major versions! This means that its e.g. not
possible to upgrade from nextcloud18 to nextcloud20 in a possible to upgrade from nextcloud18 to nextcloud20 in a
single deploy and most <literal>20.09</literal> users will single deploy and most <literal>20.09</literal> users will
have to upgrade to nextcloud20 first. have to upgrade to nextcloud20 first.
@ -1122,7 +1122,7 @@ self: super:
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
NixOS now emits a deprecation warning if systemd's NixOS now emits a deprecation warning if systemds
<literal>StartLimitInterval</literal> setting is used in a <literal>StartLimitInterval</literal> setting is used in a
<literal>serviceConfig</literal> section instead of in a <literal>serviceConfig</literal> section instead of in a
<literal>unitConfig</literal>; that setting is deprecated and <literal>unitConfig</literal>; that setting is deprecated and
@ -1158,7 +1158,7 @@ self: super:
users to declare autoscan media directories from their nixos users to declare autoscan media directories from their nixos
configuration: configuration:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.mediatomb.mediaDirectories = [ services.mediatomb.mediaDirectories = [
{ path = &quot;/var/lib/mediatomb/pictures&quot;; recursive = false; hidden-files = false; } { path = &quot;/var/lib/mediatomb/pictures&quot;; recursive = false; hidden-files = false; }
@ -1255,8 +1255,8 @@ self: super:
<listitem> <listitem>
<para> <para>
The <literal>services.dnscrypt-proxy2</literal> module now The <literal>services.dnscrypt-proxy2</literal> module now
takes the upstream's example configuration and updates it with takes the upstreams example configuration and updates it with
the user's settings. An option has been added to restore the the users settings. An option has been added to restore the
old behaviour if you prefer to declare the configuration from old behaviour if you prefer to declare the configuration from
scratch. scratch.
</para> </para>
@ -1298,7 +1298,8 @@ self: super:
<para> <para>
The zookeeper package does not provide The zookeeper package does not provide
<literal>zooInspector.sh</literal> anymore, as that <literal>zooInspector.sh</literal> anymore, as that
&quot;contrib&quot; has been dropped from upstream releases. <quote>contrib</quote> has been dropped from upstream
releases.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
@ -1317,7 +1318,7 @@ self: super:
now always ensures home directory permissions to be now always ensures home directory permissions to be
<literal>0700</literal>. Permissions had previously been <literal>0700</literal>. Permissions had previously been
ignored for already existing home directories, possibly ignored for already existing home directories, possibly
leaving them readable by others. The option's description was leaving them readable by others. The options description was
incorrect regarding ownership management and has been incorrect regarding ownership management and has been
simplified greatly. simplified greatly.
</para> </para>
@ -1518,7 +1519,7 @@ self: super:
been dropped. Users that still want it should add the been dropped. Users that still want it should add the
following to their system configuration: following to their system configuration:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.gvfs.package = pkgs.gvfs.override { samba = null; }; services.gvfs.package = pkgs.gvfs.override { samba = null; };
} }

View File

@ -642,7 +642,7 @@
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.paperless-ng.extraConfig = { services.paperless-ng.extraConfig = {
# Provide languages as ISO 639-2 codes # Provide languages as ISO 639-2 codes
@ -723,7 +723,7 @@ Superuser created successfully.
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The <literal>erigon</literal> ethereum node has moved its The <literal>erigon</literal> ethereum node has moved its
database location in <literal>2021-08-03</literal>, users database location in <literal>2021-08-03</literal>, users
upgrading must manually move their chaindata (see upgrading must manually move their chaindata (see
<link xlink:href="https://github.com/ledgerwatch/erigon/releases/tag/v2021.08.03">release <link xlink:href="https://github.com/ledgerwatch/erigon/releases/tag/v2021.08.03">release
@ -737,7 +737,7 @@ Superuser created successfully.
insecure. Out-of-tree modules are likely to require insecure. Out-of-tree modules are likely to require
adaptation: instead of adaptation: instead of
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
users.users.foo = { users.users.foo = {
isSystemUser = true; isSystemUser = true;
@ -747,7 +747,7 @@ Superuser created successfully.
<para> <para>
also create a group for your user: also create a group for your user:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
users.users.foo = { users.users.foo = {
isSystemUser = true; isSystemUser = true;

View File

@ -714,7 +714,7 @@
<literal>programs.msmtp.*</literal> can be used instead for an <literal>programs.msmtp.*</literal> can be used instead for an
equivalent setup. For example: equivalent setup. For example:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
# Original ssmtp configuration: # Original ssmtp configuration:
services.ssmtp = { services.ssmtp = {
@ -847,7 +847,7 @@
<literal>config.nixpkgs.config.allowUnfree</literal> are <literal>config.nixpkgs.config.allowUnfree</literal> are
enabled. If you still want these fonts, use: enabled. If you still want these fonts, use:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
fonts.fonts = [ fonts.fonts = [
pkgs.xorg.fontbhlucidatypewriter100dpi pkgs.xorg.fontbhlucidatypewriter100dpi
@ -942,7 +942,7 @@
<para> <para>
Before: Before:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.matrix-synapse = { services.matrix-synapse = {
enable = true; enable = true;
@ -977,7 +977,7 @@
<para> <para>
After: After:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.matrix-synapse = { services.matrix-synapse = {
enable = true; enable = true;
@ -1143,7 +1143,7 @@
<para> <para>
Before: Before:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.keycloak = { services.keycloak = {
enable = true; enable = true;
httpPort = &quot;8080&quot;; httpPort = &quot;8080&quot;;
@ -1157,7 +1157,7 @@
<para> <para>
After: After:
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
services.keycloak = { services.keycloak = {
enable = true; enable = true;
settings = { settings = {

View File

@ -1082,7 +1082,7 @@ services.github-runner.serviceOverrides.SupplementaryGroups = [
removed. This option was an association of environment removed. This option was an association of environment
variables for Grafana. If you had an expression like variables for Grafana. If you had an expression like
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.grafana.extraOptions.SECURITY_ADMIN_USER = &quot;foobar&quot;; services.grafana.extraOptions.SECURITY_ADMIN_USER = &quot;foobar&quot;;
} }
@ -1096,7 +1096,7 @@ services.github-runner.serviceOverrides.SupplementaryGroups = [
For the migration, it is recommended to turn it into the For the migration, it is recommended to turn it into the
INI format, i.e. to declare INI format, i.e. to declare
</para> </para>
<programlisting language="bash"> <programlisting language="nix">
{ {
services.grafana.settings.security.admin_user = &quot;foobar&quot;; services.grafana.settings.security.admin_user = &quot;foobar&quot;;
} }

View File

@ -13,7 +13,7 @@ booting, and try to realise the configuration in the running system
(e.g., by restarting system services). (e.g., by restarting system services).
::: {.warning} ::: {.warning}
This command doesn\'t start/stop [user services](#opt-systemd.user.services) This command doesn't start/stop [user services](#opt-systemd.user.services)
automatically. `nixos-rebuild` only runs a `daemon-reload` for each user with running automatically. `nixos-rebuild` only runs a `daemon-reload` for each user with running
user services. user services.
::: :::
@ -51,7 +51,7 @@ GRUB 2 boot screen by giving it a different *profile name*, e.g.
``` ```
which causes the new configuration (and previous ones created using which causes the new configuration (and previous ones created using
`-p test`) to show up in the GRUB submenu "NixOS - Profile \'test\'". `-p test`) to show up in the GRUB submenu "NixOS - Profile 'test'".
This can be useful to separate test configurations from "stable" This can be useful to separate test configurations from "stable"
configurations. configurations.

View File

@ -30,7 +30,7 @@ The first steps to all these are the same:
1. Switch to the NixOS channel: 1. Switch to the NixOS channel:
If you\'ve just installed Nix on a non-NixOS distribution, you will If you've just installed Nix on a non-NixOS distribution, you will
be on the `nixpkgs` channel by default. be on the `nixpkgs` channel by default.
```ShellSession ```ShellSession
@ -49,10 +49,10 @@ The first steps to all these are the same:
1. Install the NixOS installation tools: 1. Install the NixOS installation tools:
You\'ll need `nixos-generate-config` and `nixos-install`, but this You'll need `nixos-generate-config` and `nixos-install`, but this
also makes some man pages and `nixos-enter` available, just in case also makes some man pages and `nixos-enter` available, just in case
you want to chroot into your NixOS partition. NixOS installs these you want to chroot into your NixOS partition. NixOS installs these
by default, but you don\'t have NixOS yet.. by default, but you don't have NixOS yet..
```ShellSession ```ShellSession
$ nix-env -f '<nixpkgs>' -iA nixos-install-tools $ nix-env -f '<nixpkgs>' -iA nixos-install-tools
@ -70,7 +70,7 @@ The first steps to all these are the same:
refer to the partitioning, file-system creation, and mounting steps refer to the partitioning, file-system creation, and mounting steps
of [](#sec-installation) of [](#sec-installation)
If you\'re about to install NixOS in place using `NIXOS_LUSTRATE` If you're about to install NixOS in place using `NIXOS_LUSTRATE`
there is nothing to do for this step. there is nothing to do for this step.
1. Generate your NixOS configuration: 1. Generate your NixOS configuration:
@ -79,12 +79,12 @@ The first steps to all these are the same:
$ sudo `which nixos-generate-config` --root /mnt $ sudo `which nixos-generate-config` --root /mnt
``` ```
You\'ll probably want to edit the configuration files. Refer to the You'll probably want to edit the configuration files. Refer to the
`nixos-generate-config` step in [](#sec-installation) for more `nixos-generate-config` step in [](#sec-installation) for more
information. information.
Consider setting up the NixOS bootloader to give you the ability to Consider setting up the NixOS bootloader to give you the ability to
boot on your existing Linux partition. For instance, if you\'re boot on your existing Linux partition. For instance, if you're
using GRUB and your existing distribution is running Ubuntu, you may using GRUB and your existing distribution is running Ubuntu, you may
want to add something like this to your `configuration.nix`: want to add something like this to your `configuration.nix`:
@ -152,15 +152,15 @@ The first steps to all these are the same:
``` ```
Note that this will place the generated configuration files in Note that this will place the generated configuration files in
`/etc/nixos`. You\'ll probably want to edit the configuration files. `/etc/nixos`. You'll probably want to edit the configuration files.
Refer to the `nixos-generate-config` step in Refer to the `nixos-generate-config` step in
[](#sec-installation) for more information. [](#sec-installation) for more information.
You\'ll likely want to set a root password for your first boot using You'll likely want to set a root password for your first boot using
the configuration files because you won\'t have a chance to enter a the configuration files because you won't have a chance to enter a
password until after you reboot. You can initialize the root password password until after you reboot. You can initialize the root password
to an empty one with this line: (and of course don\'t forget to set to an empty one with this line: (and of course don't forget to set
one once you\'ve rebooted or to lock the account with one once you've rebooted or to lock the account with
`sudo passwd -l root` if you use `sudo`) `sudo passwd -l root` if you use `sudo`)
```nix ```nix
@ -186,7 +186,7 @@ The first steps to all these are the same:
bootup scripts require its presence). bootup scripts require its presence).
`/etc/NIXOS_LUSTRATE` tells the NixOS bootup scripts to move `/etc/NIXOS_LUSTRATE` tells the NixOS bootup scripts to move
*everything* that\'s in the root partition to `/old-root`. This will *everything* that's in the root partition to `/old-root`. This will
move your existing distribution out of the way in the very early move your existing distribution out of the way in the very early
stages of the NixOS bootup. There are exceptions (we do need to keep stages of the NixOS bootup. There are exceptions (we do need to keep
NixOS there after all), so the NixOS lustrate process will not NixOS there after all), so the NixOS lustrate process will not
@ -201,10 +201,10 @@ The first steps to all these are the same:
::: {.note} ::: {.note}
Support for `NIXOS_LUSTRATE` was added in NixOS 16.09. The act of Support for `NIXOS_LUSTRATE` was added in NixOS 16.09. The act of
\"lustrating\" refers to the wiping of the existing distribution. "lustrating" refers to the wiping of the existing distribution.
Creating `/etc/NIXOS_LUSTRATE` can also be used on NixOS to remove Creating `/etc/NIXOS_LUSTRATE` can also be used on NixOS to remove
all mutable files from your root partition (anything that\'s not in all mutable files from your root partition (anything that's not in
`/nix` or `/boot` gets \"lustrated\" on the next boot. `/nix` or `/boot` gets "lustrated" on the next boot.
lustrate /ˈlʌstreɪt/ verb. lustrate /ˈlʌstreɪt/ verb.
@ -212,14 +212,14 @@ The first steps to all these are the same:
ritual action. ritual action.
::: :::
Let\'s create the files: Let's create the files:
```ShellSession ```ShellSession
$ sudo touch /etc/NIXOS $ sudo touch /etc/NIXOS
$ sudo touch /etc/NIXOS_LUSTRATE $ sudo touch /etc/NIXOS_LUSTRATE
``` ```
Let\'s also make sure the NixOS configuration files are kept once we Let's also make sure the NixOS configuration files are kept once we
reboot on NixOS: reboot on NixOS:
```ShellSession ```ShellSession
@ -233,7 +233,7 @@ The first steps to all these are the same:
::: {.warning} ::: {.warning}
Once you complete this step, your current distribution will no Once you complete this step, your current distribution will no
longer be bootable! If you didn\'t get all the NixOS configuration longer be bootable! If you didn't get all the NixOS configuration
right, especially those settings pertaining to boot loading and root right, especially those settings pertaining to boot loading and root
partition, NixOS may not be bootable either. Have a USB rescue partition, NixOS may not be bootable either. Have a USB rescue
device ready in case this happens. device ready in case this happens.
@ -247,7 +247,7 @@ The first steps to all these are the same:
Cross your fingers, reboot, hopefully you should get a NixOS prompt! Cross your fingers, reboot, hopefully you should get a NixOS prompt!
1. If for some reason you want to revert to the old distribution, 1. If for some reason you want to revert to the old distribution,
you\'ll need to boot on a USB rescue disk and do something along you'll need to boot on a USB rescue disk and do something along
these lines: these lines:
```ShellSession ```ShellSession
@ -264,14 +264,14 @@ The first steps to all these are the same:
This may work as is or you might also need to reinstall the boot This may work as is or you might also need to reinstall the boot
loader. loader.
And of course, if you\'re happy with NixOS and no longer need the And of course, if you're happy with NixOS and no longer need the
old distribution: old distribution:
```ShellSession ```ShellSession
sudo rm -rf /old-root sudo rm -rf /old-root
``` ```
1. It\'s also worth noting that this whole process can be automated. 1. It's also worth noting that this whole process can be automated.
This is especially useful for Cloud VMs, where provider do not This is especially useful for Cloud VMs, where provider do not
provide NixOS. For instance, provide NixOS. For instance,
[nixos-infect](https://github.com/elitak/nixos-infect) uses the [nixos-infect](https://github.com/elitak/nixos-infect) uses the

View File

@ -30,7 +30,7 @@ This will create a `result` directory containing the following:
These three files are meant to be copied over to the other already running These three files are meant to be copied over to the other already running
Linux Distribution. Linux Distribution.
Note it's symlinks pointing elsewhere, so `cd` in, and use Note its symlinks pointing elsewhere, so `cd` in, and use
`scp * root@$destination` to copy it over, rather than rsync. `scp * root@$destination` to copy it over, rather than rsync.
Once you finished copying, execute `kexec-boot` *on the destination*, and after Once you finished copying, execute `kexec-boot` *on the destination*, and after

View File

@ -56,12 +56,12 @@ select the image, select the USB flash drive and click "Write".
sudo dd if=<path-to-image> of=/dev/rdiskX bs=4m sudo dd if=<path-to-image> of=/dev/rdiskX bs=4m
``` ```
After `dd` completes, a GUI dialog \"The disk After `dd` completes, a GUI dialog "The disk
you inserted was not readable by this computer\" will pop up, which can you inserted was not readable by this computer" will pop up, which can
be ignored. be ignored.
::: {.note} ::: {.note}
Using the \'raw\' `rdiskX` device instead of `diskX` with dd completes in Using the 'raw' `rdiskX` device instead of `diskX` with dd completes in
minutes instead of hours. minutes instead of hours.
::: :::

View File

@ -6,7 +6,7 @@ use a pre-made VirtualBox appliance, it is available at [the downloads
page](https://nixos.org/nixos/download.html). If you want to set up a page](https://nixos.org/nixos/download.html). If you want to set up a
VirtualBox guest manually, follow these instructions: VirtualBox guest manually, follow these instructions:
1. Add a New Machine in VirtualBox with OS Type \"Linux / Other Linux\" 1. Add a New Machine in VirtualBox with OS Type "Linux / Other Linux"
1. Base Memory Size: 768 MB or higher. 1. Base Memory Size: 768 MB or higher.
@ -16,7 +16,7 @@ VirtualBox guest manually, follow these instructions:
1. Click on Settings / System / Processor and enable PAE/NX 1. Click on Settings / System / Processor and enable PAE/NX
1. Click on Settings / System / Acceleration and enable \"VT-x/AMD-V\" 1. Click on Settings / System / Acceleration and enable "VT-x/AMD-V"
acceleration acceleration
1. Click on Settings / Display / Screen and select VMSVGA as Graphics 1. Click on Settings / Display / Screen and select VMSVGA as Graphics
@ -41,7 +41,7 @@ boot.initrd.checkJournalingFS = false;
Shared folders can be given a name and a path in the host system in the Shared folders can be given a name and a path in the host system in the
VirtualBox settings (Machine / Settings / Shared Folders, then click on VirtualBox settings (Machine / Settings / Shared Folders, then click on
the \"Add\" icon). Add the following to the the "Add" icon). Add the following to the
`/etc/nixos/configuration.nix` to auto-mount them. If you do not add `/etc/nixos/configuration.nix` to auto-mount them. If you do not add
`"nofail"`, the system will not boot properly. `"nofail"`, the system will not boot properly.

View File

@ -230,11 +230,11 @@ The recommended partition scheme differs depending if the computer uses
#### UEFI (GPT) {#sec-installation-manual-partitioning-UEFI} #### UEFI (GPT) {#sec-installation-manual-partitioning-UEFI}
[]{#sec-installation-partitioning-UEFI} <!-- legacy anchor --> []{#sec-installation-partitioning-UEFI} <!-- legacy anchor -->
Here\'s an example partition scheme for UEFI, using `/dev/sda` as the Here's an example partition scheme for UEFI, using `/dev/sda` as the
device. device.
::: {.note} ::: {.note}
You can safely ignore `parted`\'s informational message about needing to You can safely ignore `parted`'s informational message about needing to
update /etc/fstab. update /etc/fstab.
::: :::
@ -279,11 +279,11 @@ Once complete, you can follow with
#### Legacy Boot (MBR) {#sec-installation-manual-partitioning-MBR} #### Legacy Boot (MBR) {#sec-installation-manual-partitioning-MBR}
[]{#sec-installation-partitioning-MBR} <!-- legacy anchor --> []{#sec-installation-partitioning-MBR} <!-- legacy anchor -->
Here\'s an example partition scheme for Legacy Boot, using `/dev/sda` as Here's an example partition scheme for Legacy Boot, using `/dev/sda` as
the device. the device.
::: {.note} ::: {.note}
You can safely ignore `parted`\'s informational message about needing to You can safely ignore `parted`'s informational message about needing to
update /etc/fstab. update /etc/fstab.
::: :::

View File

@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell #! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/21.11 -i bash -p pandoc #! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/22.11 -i bash -p pandoc
# This script is temporarily needed while we transition the manual to # This script is temporarily needed while we transition the manual to
# CommonMark. It converts the .md files in the regular manual folder # CommonMark. It converts the .md files in the regular manual folder

View File

@ -2,7 +2,7 @@
In addition to numerous new and upgraded packages, this release has the following highlights: In addition to numerous new and upgraded packages, this release has the following highlights:
- The [Haskell](http://haskell.org/) packages infrastructure has been re-designed from the ground up (\"Haskell NG\"). NixOS now distributes the latest version of every single package registered on [Hackage](http://hackage.haskell.org/) \-- well in excess of 8,000 Haskell packages. Detailed instructions on how to use that infrastructure can be found in the [User\'s Guide to the Haskell Infrastructure](https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure). Users migrating from an earlier release may find helpful information below, in the list of backwards-incompatible changes. Furthermore, we distribute 51(!) additional Haskell package sets that provide every single [LTS Haskell](http://www.stackage.org/) release since version 0.0 as well as the most recent [Stackage Nightly](http://www.stackage.org/) snapshot. The announcement [\"Full Stackage Support in Nixpkgs\"](https://nixos.org/nix-dev/2015-September/018138.html) gives additional details. - The [Haskell](http://haskell.org/) packages infrastructure has been re-designed from the ground up ("Haskell NG"). NixOS now distributes the latest version of every single package registered on [Hackage](http://hackage.haskell.org/) \-- well in excess of 8,000 Haskell packages. Detailed instructions on how to use that infrastructure can be found in the [User's Guide to the Haskell Infrastructure](https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure). Users migrating from an earlier release may find helpful information below, in the list of backwards-incompatible changes. Furthermore, we distribute 51(!) additional Haskell package sets that provide every single [LTS Haskell](http://www.stackage.org/) release since version 0.0 as well as the most recent [Stackage Nightly](http://www.stackage.org/) snapshot. The announcement ["Full Stackage Support in Nixpkgs"](https://nixos.org/nix-dev/2015-September/018138.html) gives additional details.
- Nix has been updated to version 1.10, which among other improvements enables cryptographic signatures on binary caches for improved security. - Nix has been updated to version 1.10, which among other improvements enables cryptographic signatures on binary caches for improved security.
@ -178,7 +178,7 @@ The new option `system.stateVersion` ensures that certain configuration changes
- Nix now requires binary caches to be cryptographically signed. If you have unsigned binary caches that you want to continue to use, you should set `nix.requireSignedBinaryCaches = false`. - Nix now requires binary caches to be cryptographically signed. If you have unsigned binary caches that you want to continue to use, you should set `nix.requireSignedBinaryCaches = false`.
- Steam now doesn\'t need root rights to work. Instead of using `*-steam-chrootenv`, you should now just run `steam`. `steamChrootEnv` package was renamed to `steam`, and old `steam` package \-- to `steamOriginal`. - Steam now doesn't need root rights to work. Instead of using `*-steam-chrootenv`, you should now just run `steam`. `steamChrootEnv` package was renamed to `steam`, and old `steam` package \-- to `steamOriginal`.
- CMPlayer has been renamed to bomi upstream. Package `cmplayer` was accordingly renamed to `bomi` - CMPlayer has been renamed to bomi upstream. Package `cmplayer` was accordingly renamed to `bomi`
@ -203,7 +203,7 @@ The new option `system.stateVersion` ensures that certain configuration changes
} }
``` ```
- \"`nix-env -qa`\" no longer discovers Haskell packages by name. The only packages visible in the global scope are `ghc`, `cabal-install`, and `stack`, but all other packages are hidden. The reason for this inconvenience is the sheer size of the Haskell package set. Name-based lookups are expensive, and most `nix-env -qa` operations would become much slower if we\'d add the entire Hackage database into the top level attribute set. Instead, the list of Haskell packages can be displayed by running: - "`nix-env -qa`" no longer discovers Haskell packages by name. The only packages visible in the global scope are `ghc`, `cabal-install`, and `stack`, but all other packages are hidden. The reason for this inconvenience is the sheer size of the Haskell package set. Name-based lookups are expensive, and most `nix-env -qa` operations would become much slower if we'd add the entire Hackage database into the top level attribute set. Instead, the list of Haskell packages can be displayed by running:
```ShellSession ```ShellSession
nix-env -f "<nixpkgs>" -qaP -A haskellPackages nix-env -f "<nixpkgs>" -qaP -A haskellPackages
@ -217,11 +217,11 @@ nix-env -f "<nixpkgs>" -iA haskellPackages.pandoc
Installing Haskell _libraries_ this way, however, is no longer supported. See the next item for more details. Installing Haskell _libraries_ this way, however, is no longer supported. See the next item for more details.
- Previous versions of NixOS came with a feature called `ghc-wrapper`, a small script that allowed GHC to transparently pick up on libraries installed in the user\'s profile. This feature has been deprecated; `ghc-wrapper` was removed from the distribution. The proper way to register Haskell libraries with the compiler now is the `haskellPackages.ghcWithPackages` function. The [User\'s Guide to the Haskell Infrastructure](https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure) provides more information about this subject. - Previous versions of NixOS came with a feature called `ghc-wrapper`, a small script that allowed GHC to transparently pick up on libraries installed in the user's profile. This feature has been deprecated; `ghc-wrapper` was removed from the distribution. The proper way to register Haskell libraries with the compiler now is the `haskellPackages.ghcWithPackages` function. The [User's Guide to the Haskell Infrastructure](https://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure) provides more information about this subject.
- All Haskell builds that have been generated with version 1.x of the `cabal2nix` utility are now invalid and need to be re-generated with a current version of `cabal2nix` to function. The most recent version of this tool can be installed by running `nix-env -i cabal2nix`. - All Haskell builds that have been generated with version 1.x of the `cabal2nix` utility are now invalid and need to be re-generated with a current version of `cabal2nix` to function. The most recent version of this tool can be installed by running `nix-env -i cabal2nix`.
- The `haskellPackages` set in Nixpkgs used to have a function attribute called `extension` that users could override in their `~/.nixpkgs/config.nix` files to configure additional attributes, etc. That function still exists, but it\'s now called `overrides`. - The `haskellPackages` set in Nixpkgs used to have a function attribute called `extension` that users could override in their `~/.nixpkgs/config.nix` files to configure additional attributes, etc. That function still exists, but it's now called `overrides`.
- The OpenBLAS library has been updated to version `0.2.14`. Support for the `x86_64-darwin` platform was added. Dynamic architecture detection was enabled; OpenBLAS now selects microarchitecture-optimized routines at runtime, so optimal performance is achieved without the need to rebuild OpenBLAS locally. OpenBLAS has replaced ATLAS in most packages which use an optimized BLAS or LAPACK implementation. - The OpenBLAS library has been updated to version `0.2.14`. Support for the `x86_64-darwin` platform was added. Dynamic architecture detection was enabled; OpenBLAS now selects microarchitecture-optimized routines at runtime, so optimal performance is achieved without the need to rebuild OpenBLAS locally. OpenBLAS has replaced ATLAS in most packages which use an optimized BLAS or LAPACK implementation.
@ -312,7 +312,7 @@ Other notable improvements:
- The nixos and nixpkgs channels were unified, so one _can_ use `nix-env -iA nixos.bash` instead of `nix-env -iA nixos.pkgs.bash`. See [the commit](https://github.com/NixOS/nixpkgs/commit/2cd7c1f198) for details. - The nixos and nixpkgs channels were unified, so one _can_ use `nix-env -iA nixos.bash` instead of `nix-env -iA nixos.pkgs.bash`. See [the commit](https://github.com/NixOS/nixpkgs/commit/2cd7c1f198) for details.
- Users running an SSH server who worry about the quality of their `/etc/ssh/moduli` file with respect to the [vulnerabilities discovered in the Diffie-Hellman key exchange](https://stribika.github.io/2015/01/04/secure-secure-shell.html) can now replace OpenSSH\'s default version with one they generated themselves using the new `services.openssh.moduliFile` option. - Users running an SSH server who worry about the quality of their `/etc/ssh/moduli` file with respect to the [vulnerabilities discovered in the Diffie-Hellman key exchange](https://stribika.github.io/2015/01/04/secure-secure-shell.html) can now replace OpenSSH's default version with one they generated themselves using the new `services.openssh.moduliFile` option.
- A newly packaged TeX Live 2015 is provided in `pkgs.texlive`, split into 6500 nix packages. For basic user documentation see [the source](https://github.com/NixOS/nixpkgs/blob/release-15.09/pkgs/tools/typesetting/tex/texlive/default.nix#L1). Beware of [an issue](https://github.com/NixOS/nixpkgs/issues/9757) when installing a too large package set. The plan is to deprecate and maybe delete the original TeX packages until the next release. - A newly packaged TeX Live 2015 is provided in `pkgs.texlive`, split into 6500 nix packages. For basic user documentation see [the source](https://github.com/NixOS/nixpkgs/blob/release-15.09/pkgs/tools/typesetting/tex/texlive/default.nix#L1). Beware of [an issue](https://github.com/NixOS/nixpkgs/issues/9757) when installing a too large package set. The plan is to deprecate and maybe delete the original TeX packages until the next release.

View File

@ -152,19 +152,19 @@ When upgrading from a previous release, please be aware of the following incompa
} }
``` ```
- `s3sync` is removed, as it hasn\'t been developed by upstream for 4 years and only runs with ruby 1.8. For an actively-developer alternative look at `tarsnap` and others. - `s3sync` is removed, as it hasn't been developed by upstream for 4 years and only runs with ruby 1.8. For an actively-developer alternative look at `tarsnap` and others.
- `ruby_1_8` has been removed as it\'s not supported from upstream anymore and probably contains security issues. - `ruby_1_8` has been removed as it's not supported from upstream anymore and probably contains security issues.
- `tidy-html5` package is removed. Upstream only provided `(lib)tidy5` during development, and now they went back to `(lib)tidy` to work as a drop-in replacement of the original package that has been unmaintained for years. You can (still) use the `html-tidy` package, which got updated to a stable release from this new upstream. - `tidy-html5` package is removed. Upstream only provided `(lib)tidy5` during development, and now they went back to `(lib)tidy` to work as a drop-in replacement of the original package that has been unmaintained for years. You can (still) use the `html-tidy` package, which got updated to a stable release from this new upstream.
- `extraDeviceOptions` argument is removed from `bumblebee` package. Instead there are now two separate arguments: `extraNvidiaDeviceOptions` and `extraNouveauDeviceOptions` for setting extra X11 options for nvidia and nouveau drivers, respectively. - `extraDeviceOptions` argument is removed from `bumblebee` package. Instead there are now two separate arguments: `extraNvidiaDeviceOptions` and `extraNouveauDeviceOptions` for setting extra X11 options for nvidia and nouveau drivers, respectively.
- The `Ctrl+Alt+Backspace` key combination no longer kills the X server by default. There\'s a new option `services.xserver.enableCtrlAltBackspace` allowing to enable the combination again. - The `Ctrl+Alt+Backspace` key combination no longer kills the X server by default. There's a new option `services.xserver.enableCtrlAltBackspace` allowing to enable the combination again.
- `emacsPackagesNg` now contains all packages from the ELPA, MELPA, and MELPA Stable repositories. - `emacsPackagesNg` now contains all packages from the ELPA, MELPA, and MELPA Stable repositories.
- Data directory for Postfix MTA server is moved from `/var/postfix` to `/var/lib/postfix`. Old configurations are migrated automatically. `service.postfix` module has also received many improvements, such as correct directories\' access rights, new `aliasFiles` and `mapFiles` options and more. - Data directory for Postfix MTA server is moved from `/var/postfix` to `/var/lib/postfix`. Old configurations are migrated automatically. `service.postfix` module has also received many improvements, such as correct directories' access rights, new `aliasFiles` and `mapFiles` options and more.
- Filesystem options should now be configured as a list of strings, not a comma-separated string. The old style will continue to work, but print a warning, until the 16.09 release. An example of the new style: - Filesystem options should now be configured as a list of strings, not a comma-separated string. The old style will continue to work, but print a warning, until the 16.09 release. An example of the new style:
@ -180,7 +180,7 @@ When upgrading from a previous release, please be aware of the following incompa
- CUPS, installed by `services.printing` module, now has its data directory in `/var/lib/cups`. Old configurations from `/etc/cups` are moved there automatically, but there might be problems. Also configuration options `services.printing.cupsdConf` and `services.printing.cupsdFilesConf` were removed because they had been allowing one to override configuration variables required for CUPS to work at all on NixOS. For most use cases, `services.printing.extraConf` and new option `services.printing.extraFilesConf` should be enough; if you encounter a situation when they are not, please file a bug. - CUPS, installed by `services.printing` module, now has its data directory in `/var/lib/cups`. Old configurations from `/etc/cups` are moved there automatically, but there might be problems. Also configuration options `services.printing.cupsdConf` and `services.printing.cupsdFilesConf` were removed because they had been allowing one to override configuration variables required for CUPS to work at all on NixOS. For most use cases, `services.printing.extraConf` and new option `services.printing.extraFilesConf` should be enough; if you encounter a situation when they are not, please file a bug.
There are also Gutenprint improvements; in particular, a new option `services.printing.gutenprint` is added to enable automatic updating of Gutenprint PPMs; it\'s greatly recommended to enable it instead of adding `gutenprint` to the `drivers` list. There are also Gutenprint improvements; in particular, a new option `services.printing.gutenprint` is added to enable automatic updating of Gutenprint PPMs; it's greatly recommended to enable it instead of adding `gutenprint` to the `drivers` list.
- `services.xserver.vaapiDrivers` has been removed. Use `hardware.opengl.extraPackages{,32}` instead. You can also specify VDPAU drivers there. - `services.xserver.vaapiDrivers` has been removed. Use `hardware.opengl.extraPackages{,32}` instead. You can also specify VDPAU drivers there.
@ -202,7 +202,7 @@ When upgrading from a previous release, please be aware of the following incompa
} }
``` ```
- `services.udev.extraRules` option now writes rules to `99-local.rules` instead of `10-local.rules`. This makes all the user rules apply after others, so their results wouldn\'t be overridden by anything else. - `services.udev.extraRules` option now writes rules to `99-local.rules` instead of `10-local.rules`. This makes all the user rules apply after others, so their results wouldn't be overridden by anything else.
- Large parts of the `services.gitlab` module has been been rewritten. There are new configuration options available. The `stateDir` option was renamned to `statePath` and the `satellitesDir` option was removed. Please review the currently available options. - Large parts of the `services.gitlab` module has been been rewritten. There are new configuration options available. The `stateDir` option was renamned to `statePath` and the `satellitesDir` option was removed. Please review the currently available options.
@ -246,7 +246,7 @@ When upgrading from a previous release, please be aware of the following incompa
you should either re-run `nixos-generate-config` or manually replace `"${config.boot.kernelPackages.broadcom_sta}"` by `config.boot.kernelPackages.broadcom_sta` in your `/etc/nixos/hardware-configuration.nix`. More discussion is on [ the github issue](https://github.com/NixOS/nixpkgs/pull/12595). you should either re-run `nixos-generate-config` or manually replace `"${config.boot.kernelPackages.broadcom_sta}"` by `config.boot.kernelPackages.broadcom_sta` in your `/etc/nixos/hardware-configuration.nix`. More discussion is on [ the github issue](https://github.com/NixOS/nixpkgs/pull/12595).
- The `services.xserver.startGnuPGAgent` option has been removed. GnuPG 2.1.x changed the way the gpg-agent works, and that new approach no longer requires (or even supports) the \"start everything as a child of the agent\" scheme we\'ve implemented in NixOS for older versions. To configure the gpg-agent for your X session, add the following code to `~/.bashrc` or some file that's sourced when your shell is started: - The `services.xserver.startGnuPGAgent` option has been removed. GnuPG 2.1.x changed the way the gpg-agent works, and that new approach no longer requires (or even supports) the "start everything as a child of the agent" scheme we've implemented in NixOS for older versions. To configure the gpg-agent for your X session, add the following code to `~/.bashrc` or some file that's sourced when your shell is started:
```shell ```shell
GPG_TTY=$(tty) GPG_TTY=$(tty)
@ -273,7 +273,7 @@ When upgrading from a previous release, please be aware of the following incompa
gpg --import ~/.gnupg/secring.gpg gpg --import ~/.gnupg/secring.gpg
``` ```
The `gpg-agent(1)` man page has more details about this subject, i.e. in the \"EXAMPLES\" section. The `gpg-agent(1)` man page has more details about this subject, i.e. in the "EXAMPLES" section.
Other notable improvements: Other notable improvements:

View File

@ -20,7 +20,7 @@ When upgrading from a previous release, please be aware of the following incompa
- A large number of packages have been converted to use the multiple outputs feature of Nix to greatly reduce the amount of required disk space, as mentioned above. This may require changes to any custom packages to make them build again; see the relevant chapter in the Nixpkgs manual for more information. (Additional caveat to packagers: some packaging conventions related to multiple-output packages [were changed](https://github.com/NixOS/nixpkgs/pull/14766) late (August 2016) in the release cycle and differ from the initial introduction of multiple outputs.) - A large number of packages have been converted to use the multiple outputs feature of Nix to greatly reduce the amount of required disk space, as mentioned above. This may require changes to any custom packages to make them build again; see the relevant chapter in the Nixpkgs manual for more information. (Additional caveat to packagers: some packaging conventions related to multiple-output packages [were changed](https://github.com/NixOS/nixpkgs/pull/14766) late (August 2016) in the release cycle and differ from the initial introduction of multiple outputs.)
- Previous versions of Nixpkgs had support for all versions of the LTS Haskell package set. That support has been dropped. The previously provided `haskell.packages.lts-x_y` package sets still exist in name to aviod breaking user code, but these package sets don\'t actually contain the versions mandated by the corresponding LTS release. Instead, our package set it loosely based on the latest available LTS release, i.e. LTS 7.x at the time of this writing. New releases of NixOS and Nixpkgs will drop those old names entirely. [The motivation for this change](https://nixos.org/nix-dev/2016-June/020585.html) has been discussed at length on the `nix-dev` mailing list and in [Github issue \#14897](https://github.com/NixOS/nixpkgs/issues/14897). Development strategies for Haskell hackers who want to rely on Nix and NixOS have been described in [another nix-dev article](https://nixos.org/nix-dev/2016-June/020642.html). - Previous versions of Nixpkgs had support for all versions of the LTS Haskell package set. That support has been dropped. The previously provided `haskell.packages.lts-x_y` package sets still exist in name to aviod breaking user code, but these package sets don't actually contain the versions mandated by the corresponding LTS release. Instead, our package set it loosely based on the latest available LTS release, i.e. LTS 7.x at the time of this writing. New releases of NixOS and Nixpkgs will drop those old names entirely. [The motivation for this change](https://nixos.org/nix-dev/2016-June/020585.html) has been discussed at length on the `nix-dev` mailing list and in [Github issue \#14897](https://github.com/NixOS/nixpkgs/issues/14897). Development strategies for Haskell hackers who want to rely on Nix and NixOS have been described in [another nix-dev article](https://nixos.org/nix-dev/2016-June/020642.html).
- Shell aliases for systemd sub-commands [were dropped](https://github.com/NixOS/nixpkgs/pull/15598): `start`, `stop`, `restart`, `status`. - Shell aliases for systemd sub-commands [were dropped](https://github.com/NixOS/nixpkgs/pull/15598): `start`, `stop`, `restart`, `status`.
@ -28,7 +28,7 @@ When upgrading from a previous release, please be aware of the following incompa
- `/var/empty` is now immutable. Activation script runs `chattr +i` to forbid any modifications inside the folder. See [ the pull request](https://github.com/NixOS/nixpkgs/pull/18365) for what bugs this caused. - `/var/empty` is now immutable. Activation script runs `chattr +i` to forbid any modifications inside the folder. See [ the pull request](https://github.com/NixOS/nixpkgs/pull/18365) for what bugs this caused.
- Gitlab\'s maintainance script `gitlab-runner` was removed and split up into the more clearer `gitlab-run` and `gitlab-rake` scripts, because `gitlab-runner` is a component of Gitlab CI. - Gitlab's maintainance script `gitlab-runner` was removed and split up into the more clearer `gitlab-run` and `gitlab-rake` scripts, because `gitlab-runner` is a component of Gitlab CI.
- `services.xserver.libinput.accelProfile` default changed from `flat` to `adaptive`, as per [ official documentation](https://wayland.freedesktop.org/libinput/doc/latest/group__config.html#gad63796972347f318b180e322e35cee79). - `services.xserver.libinput.accelProfile` default changed from `flat` to `adaptive`, as per [ official documentation](https://wayland.freedesktop.org/libinput/doc/latest/group__config.html#gad63796972347f318b180e322e35cee79).
@ -38,7 +38,7 @@ When upgrading from a previous release, please be aware of the following incompa
- `pkgs.linuxPackages.virtualbox` now contains only the kernel modules instead of the VirtualBox user space binaries. If you want to reference the user space binaries, you have to use the new `pkgs.virtualbox` instead. - `pkgs.linuxPackages.virtualbox` now contains only the kernel modules instead of the VirtualBox user space binaries. If you want to reference the user space binaries, you have to use the new `pkgs.virtualbox` instead.
- `goPackages` was replaced with separated Go applications in appropriate `nixpkgs` categories. Each Go package uses its own dependency set. There\'s also a new `go2nix` tool introduced to generate a Go package definition from its Go source automatically. - `goPackages` was replaced with separated Go applications in appropriate `nixpkgs` categories. Each Go package uses its own dependency set. There's also a new `go2nix` tool introduced to generate a Go package definition from its Go source automatically.
- `services.mongodb.extraConfig` configuration format was changed to YAML. - `services.mongodb.extraConfig` configuration format was changed to YAML.

Some files were not shown because too many files have changed in this diff Show More