From 2d257f81019e6a9ee255a92810be771d753b8ba5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 4 Sep 2022 13:52:14 +0200 Subject: [PATCH] nixos/paperless: Add pgsql via unix socket example Finding out how to connect paperless to a PostgreSQL database via unix sockets and peer authentication took me a few minutes, so leaving a hint in the extraConfig example seems like a good idea to me. Also remove unnecessary use of literalExpression for attribute set, it is only required for complex values like functions or values that depend on other values or packages. --- nixos/modules/services/misc/paperless.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index 8750770cea20..9e554b93fc82 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -176,11 +176,10 @@ in See [the documentation](https://paperless-ngx.readthedocs.io/en/latest/configuration.html) for available options. ''; - example = literalExpression '' - { - PAPERLESS_OCR_LANGUAGE = "deu+eng"; - } - ''; + example = { + PAPERLESS_OCR_LANGUAGE = "deu+eng"; + PAPERLESS_DBHOST = "/run/postgresql"; + }; }; user = mkOption {