summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2024-03-27 17:33:27 +0100
committerValentin Gagarin <valentin.gagarin@tweag.io>2024-03-28 09:28:12 +0100
commitbc77c7a9730833c7668c92288c6af950e7270cb5 (patch)
tree63a416edaa93c9899044ca886aaf6976474946ed /nixos/modules/services
parent3a1b8df5dcf930de90b45694dd3ee5d142344123 (diff)
treewide: Mark Nix blocks in markdown as Nix
This should help us with highlighting and future formatting.
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/backup/borgbackup.md6
-rw-r--r--nixos/modules/services/databases/foundationdb.md6
-rw-r--r--nixos/modules/services/databases/postgresql.md12
-rw-r--r--nixos/modules/services/databases/tigerbeetle.md4
-rw-r--r--nixos/modules/services/desktops/flatpak.md4
-rw-r--r--nixos/modules/services/development/athens.md6
-rw-r--r--nixos/modules/services/development/blackfire.md2
-rw-r--r--nixos/modules/services/development/livebook.md4
-rw-r--r--nixos/modules/services/editors/emacs.md10
-rw-r--r--nixos/modules/services/mail/mailman.md4
-rw-r--r--nixos/modules/services/matrix/mjolnir.md4
-rw-r--r--nixos/modules/services/matrix/synapse.md6
-rw-r--r--nixos/modules/services/misc/anki-sync-server.md6
-rw-r--r--nixos/modules/services/misc/gitlab.md4
-rw-r--r--nixos/modules/services/misc/sourcehut/default.md2
-rw-r--r--nixos/modules/services/misc/weechat.md4
-rw-r--r--nixos/modules/services/monitoring/goss.md2
-rw-r--r--nixos/modules/services/monitoring/prometheus/exporters.md8
-rw-r--r--nixos/modules/services/network-filesystems/litestream/default.md2
-rw-r--r--nixos/modules/services/networking/pleroma.md6
-rw-r--r--nixos/modules/services/networking/prosody.md4
-rw-r--r--nixos/modules/services/networking/yggdrasil.md6
-rw-r--r--nixos/modules/services/web-apps/c2fmzq-server.md4
-rw-r--r--nixos/modules/services/web-apps/discourse.md10
-rw-r--r--nixos/modules/services/web-apps/grocy.md6
-rw-r--r--nixos/modules/services/web-apps/jitsi-meet.md4
-rw-r--r--nixos/modules/services/web-apps/keycloak.md2
-rw-r--r--nixos/modules/services/web-apps/nextcloud.md6
-rw-r--r--nixos/modules/services/web-apps/plausible.md2
-rw-r--r--nixos/modules/services/web-servers/garage.md2
-rw-r--r--nixos/modules/services/x11/desktop-managers/gnome.md18
-rw-r--r--nixos/modules/services/x11/desktop-managers/pantheon.md10
32 files changed, 88 insertions, 88 deletions
diff --git a/nixos/modules/services/backup/borgbackup.md b/nixos/modules/services/backup/borgbackup.md
index 39141f6ec858..64d9e35720f1 100644
--- a/nixos/modules/services/backup/borgbackup.md
+++ b/nixos/modules/services/backup/borgbackup.md
@@ -21,7 +21,7 @@ A complete list of options for the Borgbase module may be found
## Basic usage for a local backup {#opt-services-backup-borgbackup-local-directory}
A very basic configuration for backing up to a locally accessible directory is:
-```
+```nix
{
opt.services.borgbackup.jobs = {
{ rootBackup = {
@@ -59,7 +59,7 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID78zmOyA+5uPG4Ot0hfAy+sLDPU1L4AiIoRYEIVbbQ/
```
Add the following snippet to your NixOS configuration:
-```
+```nix
{
services.borgbackup.repos = {
my_borg_repo = {
@@ -80,7 +80,7 @@ that you have stored a secret passphrasse in the file
{file}`/run/keys/borgbackup_passphrase`, which should be only
accessible by root
-```
+```nix
{
services.borgbackup.jobs = {
backupToLocalServer = {
diff --git a/nixos/modules/services/databases/foundationdb.md b/nixos/modules/services/databases/foundationdb.md
index 0815c139152f..af17c9f95999 100644
--- a/nixos/modules/services/databases/foundationdb.md
+++ b/nixos/modules/services/databases/foundationdb.md
@@ -15,7 +15,7 @@ key-value store.
To enable FoundationDB, add the following to your
{file}`configuration.nix`:
-```
+```nix
services.foundationdb.enable = true;
services.foundationdb.package = pkgs.foundationdb71; # FoundationDB 7.1.x
```
@@ -109,7 +109,7 @@ default configuration. See below for more on scaling to increase this.
FoundationDB stores all data for all server processes under
{file}`/var/lib/foundationdb`. You can override this using
{option}`services.foundationdb.dataDir`, e.g.
-```
+```nix
services.foundationdb.dataDir = "/data/fdb";
```
@@ -265,7 +265,7 @@ directories.
For example, to create backups in {command}`/opt/fdb-backups`, first
set up the paths in the module options:
-```
+```nix
services.foundationdb.extraReadWritePaths = [ "/opt/fdb-backups" ];
```
diff --git a/nixos/modules/services/databases/postgresql.md b/nixos/modules/services/databases/postgresql.md
index 3ff1f00fa9cf..ce1f2856b019 100644
--- a/nixos/modules/services/databases/postgresql.md
+++ b/nixos/modules/services/databases/postgresql.md
@@ -15,7 +15,7 @@ PostgreSQL is an advanced, free relational database.
## Configuring {#module-services-postgres-configuring}
To enable PostgreSQL, add the following to your {file}`configuration.nix`:
-```
+```nix
services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql_15;
```
@@ -35,7 +35,7 @@ alice=>
-->
By default, PostgreSQL stores its databases in {file}`/var/lib/postgresql/$psqlSchema`. You can override this using [](#opt-services.postgresql.dataDir), e.g.
-```
+```nix
services.postgresql.dataDir = "/data/postgresql";
```
@@ -174,7 +174,7 @@ $ nix-instantiate --eval -A postgresql_13.psqlSchema
"13"
```
For an upgrade, a script like this can be used to simplify the process:
-```
+```nix
{ config, pkgs, ... }:
{
environment.systemPackages = [
@@ -256,7 +256,7 @@ postgresql_15.pkgs.pg_partman postgresql_15.pkgs.pgroonga
```
To add plugins via NixOS configuration, set `services.postgresql.extraPlugins`:
-```
+```nix
services.postgresql.package = pkgs.postgresql_12;
services.postgresql.extraPlugins = ps: with ps; [
pg_repack
@@ -265,7 +265,7 @@ services.postgresql.extraPlugins = ps: with ps; [
```
You can build custom PostgreSQL-with-plugins (to be used outside of NixOS) using function `.withPackages`. For example, creating a custom PostgreSQL package in an overlay can look like:
-```
+```nix
self: super: {
postgresql_custom = self.postgresql_12.withPackages (ps: [
ps.pg_repack
@@ -275,7 +275,7 @@ self: super: {
```
Here's a recipe on how to override a particular plugin through an overlay:
-```
+```nix
self: super: {
postgresql_15 = super.postgresql_15// {
pkgs = super.postgresql_15.pkgs // {
diff --git a/nixos/modules/services/databases/tigerbeetle.md b/nixos/modules/services/databases/tigerbeetle.md
index 47394d443059..ed05c982350d 100644
--- a/nixos/modules/services/databases/tigerbeetle.md
+++ b/nixos/modules/services/databases/tigerbeetle.md
@@ -7,7 +7,7 @@
TigerBeetle is a distributed financial accounting database designed for mission critical safety and performance.
To enable TigerBeetle, add the following to your {file}`configuration.nix`:
-```
+```nix
services.tigerbeetle.enable = true;
```
@@ -20,7 +20,7 @@ By default, TigerBeetle will only listen on a local interface.
To configure it to listen on a different interface (and to configure it to connect to other replicas, if you're creating more than one), you'll have to set the `addresses` option.
Note that the TigerBeetle module won't open any firewall ports automatically, so if you configure it to listen on an external interface, you'll need to ensure that connections can reach it:
-```
+```nix
services.tigerbeetle = {
enable = true;
addresses = [ "0.0.0.0:3001" ];
diff --git a/nixos/modules/services/desktops/flatpak.md b/nixos/modules/services/desktops/flatpak.md
index af71d85b5a15..57aa41b56224 100644
--- a/nixos/modules/services/desktops/flatpak.md
+++ b/nixos/modules/services/desktops/flatpak.md
@@ -8,7 +8,7 @@ Flatpak is a system for building, distributing, and running sandboxed desktop
applications on Linux.
To enable Flatpak, add the following to your {file}`configuration.nix`:
-```
+```nix
services.flatpak.enable = true;
```
@@ -16,7 +16,7 @@ For the sandboxed apps to work correctly, desktop integration portals need to
be installed. If you run GNOME, this will be handled automatically for you;
in other cases, you will need to add something like the following to your
{file}`configuration.nix`:
-```
+```nix
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
xdg.portal.config.common.default = "gtk";
```
diff --git a/nixos/modules/services/development/athens.md b/nixos/modules/services/development/athens.md
index 77663db509d5..142cc74b5d0d 100644
--- a/nixos/modules/services/development/athens.md
+++ b/nixos/modules/services/development/athens.md
@@ -18,7 +18,7 @@ A complete list of options for the Athens module may be found
## Basic usage for a caching proxy configuration {#opt-services-development-athens-caching-proxy}
A very basic configuration for Athens that acts as a caching and forwarding HTTP proxy is:
-```
+```nix
{
services.athens = {
enable = true;
@@ -28,7 +28,7 @@ A very basic configuration for Athens that acts as a caching and forwarding HTTP
If you want to prevent Athens from writing to disk, you can instead configure it to cache modules only in memory:
-```
+```nix
{
services.athens = {
enable = true;
@@ -39,7 +39,7 @@ If you want to prevent Athens from writing to disk, you can instead configure it
To use the local proxy in Go builds, you can set the proxy as environment variable:
-```
+```nix
{
environment.variables = {
GOPROXY = "http://localhost:3000"
diff --git a/nixos/modules/services/development/blackfire.md b/nixos/modules/services/development/blackfire.md
index e2e7e4780c79..5a7fbe68f7d2 100644
--- a/nixos/modules/services/development/blackfire.md
+++ b/nixos/modules/services/development/blackfire.md
@@ -7,7 +7,7 @@
[Blackfire](https://blackfire.io) is a proprietary tool for profiling applications. There are several languages supported by the product but currently only PHP support is packaged in Nixpkgs. The back-end consists of a module that is loaded into the language runtime (called *probe*) and a service (*agent*) that the probe connects to and that sends the profiles to the server.
To use it, you will need to enable the agent and the probe on your server. The exact method will depend on the way you use PHP but here is an example of NixOS configuration for PHP-FPM:
-```
+```nix
let
php = pkgs.php.withExtensions ({ enabled, all }: enabled ++ (with all; [
blackfire
diff --git a/nixos/modules/services/development/livebook.md b/nixos/modules/services/development/livebook.md
index 5315f2c2755a..3a3d9584675b 100644
--- a/nixos/modules/services/development/livebook.md
+++ b/nixos/modules/services/development/livebook.md
@@ -9,7 +9,7 @@ Enabling the `livebook` service creates a user
[`systemd`](https://www.freedesktop.org/wiki/Software/systemd/) unit
which runs the server.
-```
+```nix
{ ... }:
{
@@ -51,6 +51,6 @@ some features require additional packages. For example, the machine
learning Kinos require `gcc` and `gnumake`. To add these, use
`extraPackages`:
-```
+```nix
services.livebook.extraPackages = with pkgs; [ gcc gnumake ];
```
diff --git a/nixos/modules/services/editors/emacs.md b/nixos/modules/services/editors/emacs.md
index 02f47b098d86..9164ee2adcb5 100644
--- a/nixos/modules/services/editors/emacs.md
+++ b/nixos/modules/services/editors/emacs.md
@@ -178,7 +178,7 @@ file {file}`configuration.nix` to make it contain:
::: {.example #module-services-emacs-configuration-nix}
### Custom Emacs in `configuration.nix`
-```
+```nix
{
environment.systemPackages = [
# [...]
@@ -203,7 +203,7 @@ adding it to your {file}`~/.config/nixpkgs/config.nix` (see
::: {.example #module-services-emacs-config-nix}
### Custom Emacs in `~/.config/nixpkgs/config.nix`
-```
+```nix
{
packageOverrides = super: let self = super.pkgs; in {
myemacs = import ./emacs.nix { pkgs = self; };
@@ -228,7 +228,7 @@ only use {command}`emacsclient`), you can change your file
::: {.example #ex-emacsGtk3Nix}
### Custom Emacs build
-```
+```nix
{ pkgs ? import <nixpkgs> {} }:
let
myEmacs = (pkgs.emacs.override {
@@ -262,7 +262,7 @@ with the user's login session.
To install and enable the {command}`systemd` user service for Emacs
daemon, add the following to your {file}`configuration.nix`:
-```
+```nix
services.emacs.enable = true;
```
@@ -323,7 +323,7 @@ In general, {command}`systemd` user services are globally enabled
by symlinks in {file}`/etc/systemd/user`. In the case where
Emacs daemon is not wanted for all users, it is possible to install the
service but not globally enable it:
-```
+```nix
services.emacs.enable = false;
services.emacs.install = true;
```
diff --git a/nixos/modules/services/mail/mailman.md b/nixos/modules/services/mail/mailman.md
index 55b61f8a2582..446aa1f921b6 100644
--- a/nixos/modules/services/mail/mailman.md
+++ b/nixos/modules/services/mail/mailman.md
@@ -9,7 +9,7 @@ an existing, securely configured Postfix setup, as it does not automatically con
## Basic usage with Postfix {#module-services-mailman-basic-usage}
For a basic configuration with Postfix as the MTA, the following settings are suggested:
-```
+```nix
{ config, ... }: {
services.postfix = {
enable = true;
@@ -50,7 +50,7 @@ necessary, but outside the scope of the Mailman module.
## Using with other MTAs {#module-services-mailman-other-mtas}
Mailman also supports other MTA, though with a little bit more configuration. For example, to use Mailman with Exim, you can use the following settings:
-```
+```nix
{ config, ... }: {
services = {
mailman = {
diff --git a/nixos/modules/services/matrix/mjolnir.md b/nixos/modules/services/matrix/mjolnir.md
index f6994eeb8fa5..2594f05ce27b 100644
--- a/nixos/modules/services/matrix/mjolnir.md
+++ b/nixos/modules/services/matrix/mjolnir.md
@@ -46,7 +46,7 @@ autoconfigure a new Pantalaimon instance, which will connect to the homeserver
set in [services.mjolnir.homeserverUrl](#opt-services.mjolnir.homeserverUrl) and Mjolnir itself
will be configured to connect to the new Pantalaimon instance.
-```
+```nix
{
services.mjolnir = {
enable = true;
@@ -78,7 +78,7 @@ uses across an entire homeserver.
To use the Antispam Module, add `matrix-synapse-plugins.matrix-synapse-mjolnir-antispam`
to the Synapse plugin list and enable the `mjolnir.Module` module.
-```
+```nix
{
services.matrix-synapse = {
plugins = with pkgs; [
diff --git a/nixos/modules/services/matrix/synapse.md b/nixos/modules/services/matrix/synapse.md
index 9c9c025fc5f5..7f6587ce09df 100644
--- a/nixos/modules/services/matrix/synapse.md
+++ b/nixos/modules/services/matrix/synapse.md
@@ -23,7 +23,7 @@ synapse server for the `example.org` domain, served from
the host `myhostname.example.org`. For more information,
please refer to the
[installation instructions of Synapse](https://element-hq.github.io/synapse/latest/setup/installation.html) .
-```
+```nix
{ pkgs, lib, config, ... }:
let
fqdn = "${config.networking.hostName}.${config.networking.domain}";
@@ -158,7 +158,7 @@ in an additional file like this:
by `matrix-synapse`.
- Include the file like this in your configuration:
- ```
+ ```nix
{
services.matrix-synapse.extraConfigFiles = [
"/run/secrets/matrix-shared-secret"
@@ -190,7 +190,7 @@ fill in the required connection details automatically when you enter your
Matrix Identifier. See
[Try Matrix Now!](https://matrix.org/docs/projects/try-matrix-now.html)
for a list of existing clients and their supported featureset.
-```
+```nix
{
services.nginx.virtualHosts."element.${fqdn}" = {
enableACME = true;
diff --git a/nixos/modules/services/misc/anki-sync-server.md b/nixos/modules/services/misc/anki-sync-server.md
index 5d2b4da4d2fc..f58d3d8ad0da 100644
--- a/nixos/modules/services/misc/anki-sync-server.md
+++ b/nixos/modules/services/misc/anki-sync-server.md
@@ -16,7 +16,7 @@ unit which runs the sync server with an isolated user using the systemd
`DynamicUser` option.
This can be done by enabling the `anki-sync-server` service:
-```
+```nix
{ ... }:
{
@@ -27,7 +27,7 @@ This can be done by enabling the `anki-sync-server` service:
It is necessary to set at least one username-password pair under
{option}`services.anki-sync-server.users`. For example
-```
+```nix
{
services.anki-sync-server.users = [
{
@@ -50,7 +50,7 @@ you want to expose the sync server directly to other computers (not recommended
in most circumstances, because the sync server doesn't use HTTPS), then set the
following options:
-```
+```nix
{
services.anki-sync-server.host = "0.0.0.0";
services.anki-sync-server.openFirewall = true;
diff --git a/nixos/modules/services/misc/gitlab.md b/nixos/modules/services/misc/gitlab.md
index 916b23584ed0..ea1b95607c63 100644
--- a/nixos/modules/services/misc/gitlab.md
+++ b/nixos/modules/services/misc/gitlab.md
@@ -10,7 +10,7 @@ configure a webserver to proxy HTTP requests to the socket.
For instance, the following configuration could be used to use nginx as
frontend proxy:
-```
+```nix
services.nginx = {
enable = true;
recommendedGzipSettings = true;
@@ -35,7 +35,7 @@ The default state dir is `/var/gitlab/state`. This is where
all data like the repositories and uploads will be stored.
A basic configuration with some custom settings could look like this:
-```
+```nix
services.gitlab = {
enable = true;
databasePasswordFile = "/var/keys/gitlab/db_password";
diff --git a/nixos/modules/services/misc/sourcehut/default.md b/nixos/modules/services/misc/sourcehut/default.md
index 44d58aa0bef3..5f841833a954 100644
--- a/nixos/modules/services/misc/sourcehut/default.md
+++ b/nixos/modules/services/misc/sourcehut/default.md
@@ -12,7 +12,7 @@ This NixOS module also provides basic configuration integrating Sourcehut into l
and `services.postgresql` services.
A very basic configuration may look like this:
-```
+```nix
{ pkgs, ... }:
let
fqdn =
diff --git a/nixos/modules/services/misc/weechat.md b/nixos/modules/services/misc/weechat.md
index 21f41be5b4a0..fb20ebe1e4db 100644
--- a/nixos/modules/services/misc/weechat.md
+++ b/nixos/modules/services/misc/weechat.md
@@ -12,7 +12,7 @@ unit which runs the chat client in a detached
session.
This can be done by enabling the `weechat` service:
-```
+```nix
{ ... }:
{
@@ -30,7 +30,7 @@ allow your another user to attach to this session, the
`screenrc` needs to be tweaked by adding
[multiuser](https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser)
support:
-```
+```nix
{
programs.screen.screenrc = ''
multiuser on
diff --git a/nixos/modules/services/monitoring/goss.md b/nixos/modules/services/monitoring/goss.md
index 1e636aa3bdf3..bf91d42011fa 100644
--- a/nixos/modules/services/monitoring/goss.md
+++ b/nixos/modules/services/monitoring/goss.md
@@ -7,7 +7,7 @@ for validating a server's configuration.
A minimal configuration looks like this:
-```
+```nix
{
services.goss = {
enable = true;
diff --git a/nixos/modules/services/monitoring/prometheus/exporters.md b/nixos/modules/services/monitoring/prometheus/exporters.md
index 34fadecadc74..84de17789601 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters.md
+++ b/nixos/modules/services/monitoring/prometheus/exporters.md
@@ -9,7 +9,7 @@ One of the most common exporters is the
[node exporter](https://github.com/prometheus/node_exporter),
it provides hardware and OS metrics from the host it's
running on. The exporter could be configured as follows:
-```
+```nix
services.prometheus.exporters.node = {
enable = true;
port = 9100;
@@ -35,7 +35,7 @@ configuration see `man configuration.nix` or search through
the [available options](https://nixos.org/nixos/options.html#prometheus.exporters).
Prometheus can now be configured to consume the metrics produced by the exporter:
-```
+```nix
services.prometheus = {
# ...
@@ -75,7 +75,7 @@ example:
`nixos/modules/services/monitoring/prometheus/exporters/`
directory, which will be called postfix.nix and contains all exporter
specific options and configuration:
- ```
+ ```nix
# nixpkgs/nixos/modules/services/prometheus/exporters/postfix.nix
{ config, lib, pkgs, options }:
@@ -148,7 +148,7 @@ example:
Should an exporter option change at some point, it is possible to add
information about the change to the exporter definition similar to
`nixpkgs/nixos/modules/rename.nix`:
-```
+```nix
{ config, lib, pkgs, options }:
with lib;
diff --git a/nixos/modules/services/network-filesystems/litestream/default.md b/nixos/modules/services/network-filesystems/litestream/default.md
index 8d8486507b77..626d69df84a5 100644
--- a/nixos/modules/services/network-filesystems/litestream/default.md
+++ b/nixos/modules/services/network-filesystems/litestream/default.md
@@ -8,7 +8,7 @@ replication tool for SQLite.
Litestream service is managed by a dedicated user named `litestream`
which needs permission to the database file. Here's an example config which gives
required permissions to access [grafana database](#opt-services.grafana.settings.database.path):
-```
+```nix
{ pkgs, ... }:
{
users.users.litestream.extraGroups = [ "grafana" ];
diff --git a/nixos/modules/services/networking/pleroma.md b/nixos/modules/services/networking/pleroma.md
index 7c499e1c616c..4fb3996b70e8 100644
--- a/nixos/modules/services/networking/pleroma.md
+++ b/nixos/modules/services/networking/pleroma.md
@@ -17,7 +17,7 @@ The `config.exs` file can be further customized following the instructions on th
## Initializing the database {#module-services-pleroma-initialize-db}
First, the Postgresql service must be enabled in the NixOS configuration
-```
+```nix
services.postgresql = {
enable = true;
package = pkgs.postgresql_13;
@@ -38,7 +38,7 @@ $ sudo -u postgres psql -f setup.psql
In this section we will enable the Pleroma service only locally, so its configurations can be improved incrementally.
This is an example of configuration, where [](#opt-services.pleroma.configs) option contains the content of the file `config.exs`, generated [in the first section](#module-services-pleroma-generate-config), but with the secrets (database password, endpoint secret key, salts, etc.) removed. Removing secrets is important, because otherwise they will be stored publicly in the Nix store.
-```
+```nix
services.pleroma = {
enable = true;
secretConfigFile = "/var/lib/pleroma/secrets.exs";
@@ -121,7 +121,7 @@ $ pleroma_ctl user new <nickname> <email> --admin --moderator --password <passw
In this configuration, Pleroma is listening only on the local port 4000. Nginx can be configured as a Reverse Proxy, for forwarding requests from public ports to the Pleroma service. This is an example of configuration, using
[Let's Encrypt](https://letsencrypt.org/) for the TLS certificates
-```
+```nix
security.acme = {
email = "root@example.net";
acceptTerms = true;
diff --git a/nixos/modules/services/networking/prosody.md b/nixos/modules/services/networking/prosody.md
index 2da2c242a98b..8f48b5adb280 100644
--- a/nixos/modules/services/networking/prosody.md
+++ b/nixos/modules/services/networking/prosody.md
@@ -25,7 +25,7 @@ A good configuration to start with, including a
[Multi User Chat (MUC)](https://xmpp.org/extensions/xep-0045.html)
endpoint as well as a [HTTP File Upload](https://xmpp.org/extensions/xep-0363.html)
endpoint will look like this:
-```
+```nix
services.prosody = {
enable = true;
admins = [ "root@example.org" ];
@@ -57,7 +57,7 @@ certificate by leveraging the ACME
Provided the setup detailed in the previous section, you'll need the following acme configuration to generate
a TLS certificate for the three endponits:
-```
+```nix
security.acme = {
email = "root@example.org";
acceptTerms = true;
diff --git a/nixos/modules/services/networking/yggdrasil.md b/nixos/modules/services/networking/yggdrasil.md
index bbaea5bc74aa..7b899f9d6ddb 100644
--- a/nixos/modules/services/networking/yggdrasil.md
+++ b/nixos/modules/services/networking/yggdrasil.md
@@ -12,7 +12,7 @@ self-arranging IPv6 network.
### Simple ephemeral node {#module-services-networking-yggdrasil-configuration-simple}
An annotated example of a simple configuration:
-```
+```nix
{
services.yggdrasil = {
enable = true;
@@ -39,7 +39,7 @@ An annotated example of a simple configuration:
### Persistent node with prefix {#module-services-networking-yggdrasil-configuration-prefix}
A node with a fixed address that announces a prefix:
-```
+```nix
let
address = "210:5217:69c0:9afc:1b95:b9f:8718:c3d2";
prefix = "310:5217:69c0:9afc";
@@ -90,7 +90,7 @@ in {
A NixOS container attached to the Yggdrasil network via a node running on the
host:
-```
+```nix
let
yggPrefix64 = "310:5217:69c0:9afc";
# Again, taken from the output of "yggdrasilctl getself".
diff --git a/nixos/modules/services/web-apps/c2fmzq-server.md b/nixos/modules/services/web-apps/c2fmzq-server.md
index 236953bd4ff7..d8e59b3ad210 100644
--- a/nixos/modules/services/web-apps/c2fmzq-server.md
+++ b/nixos/modules/services/web-apps/c2fmzq-server.md
@@ -4,7 +4,7 @@ c2FmZQ is an application that can securely encrypt, store, and share files,
including but not limited to pictures and videos.
The service `c2fmzq-server` can be enabled by setting
-```
+```nix
{
services.c2fmzq-server.enable = true;
}
@@ -17,7 +17,7 @@ In principle the server can be exposed directly on a public interface and there
are command line options to manage HTTPS certificates directly, but the module
is designed to be served behind a reverse proxy or only accessed via localhost.
-```
+```nix
{
services.c2fmzq-server = {
enable = true;
diff --git a/nixos/modules/services/web-apps/discourse.md b/nixos/modules/services/web-apps/discourse.md
index 35180bea87d9..799a01c6ff5b 100644
--- a/nixos/modules/services/web-apps/discourse.md
+++ b/nixos/modules/services/web-apps/discourse.md
@@ -6,7 +6,7 @@ modern and open source discussion platform.
## Basic usage {#module-services-discourse-basic-usage}
A minimal configuration using Let's Encrypt for TLS certificates looks like this:
-```
+```nix
services.discourse = {
enable = true;
hostname