Document flake dev setup

This commit is contained in:
eikek
2024-03-10 00:59:56 +01:00
parent 2e18274803
commit 8bcc88ed65
7 changed files with 231 additions and 45 deletions

View File

@ -5,6 +5,34 @@ weight = 24
# Nix
Docspell is a flake, you need to enable flakes in order to make use of
it. You can also use the provided expressions without Flakes, which is
described below.
## Try it out {try-it-out}
You can try out the server and joex packages by running the following:
```
nix run github:eikek/docspell#docspell-server
nix run github:eikek/docspell#docspell-joex
```
While this works, it will be only a very basic setup. The database
defaults to a directory in `/tmp` and no fulltext search enabled. Then
for processing documents, some external tools are required which would
need to be present on yout system to make it work.
A more elaborate setup with PostgreSQL and SOLR can be started using
the `test-vm`:
```
nix run github:eikek/docspell#nixosConfigurations.test-vm.config.system.build.vm
```
The vm contains all the required tools. After starting up, you can
find docspell at `http://localhost:7881`.
## Install via Nix
Docspell can be installed via the [nix](https://nixos.org/nix) package
@ -12,6 +40,16 @@ manager. Docspell is currently not part of the [nixpkgs
collection](https://nixos.org/nixpkgs/), but you can use the flake
from this repository.
You could install the server and joex by running the following:
```
nix profile install github:eikek/docspell#docspell-server
nix profile install github:eikek/docspell#docspell-joex
```
This would install the packages on your system. If you use NixOS you
probably want to use the provided [NixOS modules](#nixos) instead.
## Upgrading
Since [downgrading](@/docs/install/downgrading.md) is not supported,
@ -164,3 +202,7 @@ in
The same way import NixOS modules from
`nix/modules/{joex|server}.nix`.
An alternative can be to use `builtins.getFlake` to fetch the flake
and get access to its output. But this requires to use a flake enabled
nix, which then defeats the idea of "not using flakes".