summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/databases
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/databases
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/databases')
-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
3 files changed, 11 insertions, 11 deletions
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" ];