eikek / docspell

Assist in organizing your piles of documents, resulting from scanners, e-mails and other sources with miminal effort.
https://docspell.org
GNU Affero General Public License v3.0
1.5k stars 116 forks source link

Add "package" option for docspell nix modules #2627

Closed VTimofeenko closed 2 months ago

VTimofeenko commented 2 months ago

Currently Docspell services use hardcoded pkgs.docspell-joex and pkgs.docspell-restserver:

# joex.nix
      cmd = "${pkgs.docspell-joex}/bin/docspell-joex ${args} -- ${configFile}";
# server.nix
      cmd = "${pkgs.docspell-restserver}/bin/docspell-restserver ${args} -- ${configFile}";

This approach has two implications:

  1. It requires an overlay to be passed to pkgs instance
  2. It does not allow the user to specify a custom version of docspell (unless it's been patched in pkgs instance)

Many services.<name> modules in NixOS implement a package option which allows the user to override the package that is used for the service in the specific modules. This also allows skipping the overlay part.

If ACKed, I'd be happy to implement this option in a PR. The implementation would leave the default behavior as is.

eikek commented 2 months ago

Yes sure, that would be very nice!