The upcoming NixOS 22.05 release will feature a new module to easily setup a invoicing web app called Invocieplane. Here’s a short introduction on the app and how to use it on NixOS.

Invoiceplane is an open-source web application for managing clients, invoices and product sets. You can use it to easily create invoices as PDF files.

Creating an instance of Invoiceplane on NixOS will be as simple as adding following line to your system configuration

invoiceplane.sites."invoice.example.org".enable = true;

After that you can access the installation wizard at https://invoice.example.org/setup and finish the setup. In the example above, you don’t have to setup and configure the database backend. Without further options, this will be managed by the module.

A more advanced configuration example would look like this

template-vtdirektmarketing = pkgs.stdenv.mkDerivation {
  name = "vtdirektmarketing";
  src = pkgs.fetchgit {
    url = "https://git.project-insanity.org/onny/invoiceplane-vtdirektmarketing.git";
    sha256 = "1hh0q7wzsh8v8x03i82p6qrgbxr4v5fb05xylyrpp975l8axyg2z";
  };
  sourceRoot = ".";
  installPhase = ''
    mkdir -p $out
    cp invoiceplane-vtdirektmarketing/vtdirektmarketing.php $out/
  '';
};

invoiceplane.sites."invoice.example.org" = {
  enable = true;
  extraConfig = ''
    ENCRYPTION_KEY=base64:jMhKslJphUu2BRCALcrqNLBkFeAOxhWsM07auNmA8go=
    SETUP_COMPLETED=true
    DISABLE_SETUP=true
    IP_URL=https://invoice.example.org
  '';
  invoiceTemplates = [ template-vtdirektmarketing ];
};

Here we also download and install an invoice template (for PDF export) and add extra lines to the app configuration.

Unfortunately currently Invoiceplane only seems to get security updates. Further development of the app has stalled. An alternative open-source invoicing app which might be worth to check out is creater, which could be available as an NixOS module soon.