mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-07 06:39:32 +00:00
Add package option to Nix modules
"Package" option allows specifying the derivation that will be used for the systemd service. Works the same way as `services.<name>.package` in NixOS. By default picks the docspell packages from pkgs instance -- same behavior as prior to this commit Closes #2627
This commit is contained in:
parent
adf3a9045e
commit
004add0dd1
nix/modules
@ -306,6 +306,7 @@ in {
|
||||
default = false;
|
||||
description = "Whether to enable docspell docspell job executor.";
|
||||
};
|
||||
package = mkPackageOption pkgs "docspell-joex" {};
|
||||
runAs = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
@ -1777,7 +1778,7 @@ in {
|
||||
|
||||
systemd.services.docspell-joex = let
|
||||
args = builtins.concatStringsSep " " cfg.jvmArgs;
|
||||
cmd = "${pkgs.docspell-joex}/bin/docspell-joex ${args} -- ${configFile}";
|
||||
cmd = "${lib.getExe' cfg.package "docspell-joex"} ${args} -- ${configFile}";
|
||||
waitTarget =
|
||||
if cfg.waitForTarget != null
|
||||
then [cfg.waitForTarget]
|
||||
|
@ -150,6 +150,7 @@ in {
|
||||
default = false;
|
||||
description = "Whether to enable docspell.";
|
||||
};
|
||||
package = mkPackageOption pkgs "docspell-restserver" {};
|
||||
runAs = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
@ -878,7 +879,7 @@ in {
|
||||
|
||||
systemd.services.docspell-restserver = let
|
||||
args = builtins.concatStringsSep " " cfg.jvmArgs;
|
||||
cmd = "${pkgs.docspell-restserver}/bin/docspell-restserver ${args} -- ${configFile}";
|
||||
cmd = "${lib.getExe' cfg.package "docspell-restserver"} ${args} -- ${configFile}";
|
||||
in {
|
||||
description = "Docspell Rest Server";
|
||||
after = ["networking.target"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user