From NixOS Wiki

Paperless-ngx is a community-supported open-source document management system that transforms your physical documents into a searchable online archive, allowing you to reduce paper clutter.


The following example configuration will enable Paperless locally

environment.etc."paperless-admin-pass".text = "admin";
services.paperless = {
  enable = true;
  passwordFile = "/etc/paperless-admin-pass";

After applying the configuration you can access the instance via http://localhost:28981 and login with username admin and password admin.