mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
Add support for integrating into nix/nixos
This commit is contained in:
@ -80,6 +80,46 @@ docspell.joex {
|
||||
}
|
||||
```
|
||||
|
||||
## Nix Expressions
|
||||
|
||||
The directory `/nix` contains nix expressions to install docspell via
|
||||
the nix package manager and to integrate it into NixOS.
|
||||
|
||||
### Testing NixOS Modules
|
||||
|
||||
The modules can be build by building the `configuration-test.nix` file
|
||||
together with some nixpkgs version. For example:
|
||||
|
||||
``` shell
|
||||
nixos-rebuild build-vm -I nixos-config=./configuration-test.nix \
|
||||
-I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.09.tar.gz
|
||||
```
|
||||
|
||||
This will build all modules imported in `configuration-test.nix` and
|
||||
create a virtual machine containing the system. After that completes,
|
||||
the system configuration can be found behind the `./result/system`
|
||||
symlink. So it is possible to look at the generated systemd config for
|
||||
example:
|
||||
|
||||
``` shell
|
||||
cat result/system/etc/systemd/system/docspell-joex.service
|
||||
```
|
||||
|
||||
And with some more commands (there probably is an easier way…) the
|
||||
config file can be checked:
|
||||
|
||||
``` shell
|
||||
cat result/system/etc/systemd/system/docspell-joex.service | grep ExecStart | cut -d'=' -f2 | xargs cat | tail -n1 | awk '{print $NF}'| sed 's/.$//' | xargs cat | jq
|
||||
```
|
||||
|
||||
To see the module in action, the vm can be started (the first line
|
||||
sets more memory for the vm):
|
||||
|
||||
``` shell
|
||||
export QEMU_OPTS="-m 2048"
|
||||
./result/bin/run-docspelltest-vm
|
||||
```
|
||||
|
||||
## ADRs
|
||||
|
||||
Some early information about certain details can be found in the few
|
||||
|
@ -23,7 +23,7 @@ docspell.server {
|
||||
# The secret for this server that is used to sign the authenicator
|
||||
# tokens. If multiple servers are running, all must share the same
|
||||
# secret. You can use base64 or hex strings (prefix with b64: and
|
||||
# hex:, respectively)
|
||||
# hex:, respectively).
|
||||
server-secret = "hex:caffee"
|
||||
|
||||
# How long an authentication token is valid. The web application
|
||||
@ -68,9 +68,10 @@ docspell.server {
|
||||
}
|
||||
|
||||
files {
|
||||
# Defines the chunk size used to store bytes. This will affect
|
||||
# the memory footprint when uploading and downloading files. At
|
||||
# most this amount is loaded into RAM for down- and uploading.
|
||||
# Defines the chunk size (in bytes) used to store the files.
|
||||
# This will affect the memory footprint when uploading and
|
||||
# downloading files. At most this amount is loaded into RAM for
|
||||
# down- and uploading.
|
||||
#
|
||||
# It also defines the chunk size used for the blobs inside the
|
||||
# database.
|
||||
|
Reference in New Issue
Block a user