nixos/redmine: Add PDF export support for gant
Ghostscript is needed to export Gant diagrams as PDF. Thus, add the option `services.redmine.components.ghostscript` allowing to enable or disable the component. The component is disabled by default. Enabling the option will add Ghostscript to the Redmine environment and configure the setting `gs_command` in the Redmine configuration file. Signed-off-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
parent
92b1cf8b4c
commit
4d23eae938
|
@ -243,6 +243,12 @@ in
|
|||
default = false;
|
||||
description = "Allows exporting Gant diagrams as PNG.";
|
||||
};
|
||||
|
||||
ghostscript = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Allows exporting Gant diagrams as PDF.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -272,6 +278,7 @@ in
|
|||
scm_git_command = if cfg.components.git then "${pkgs.git}/bin/git" else "";
|
||||
scm_cvs_command = if cfg.components.cvs then "${pkgs.cvs}/bin/cvs" else "";
|
||||
scm_bazaar_command = if cfg.components.breezy then "${pkgs.breezy}/bin/bzr" else "";
|
||||
gs_command = if cfg.components.ghostscript then "${pkgs.ghostscript}/bin/gs" else "";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -339,7 +346,8 @@ in
|
|||
++ optional cfg.components.git git
|
||||
++ optional cfg.components.cvs cvs
|
||||
++ optional cfg.components.breezy breezy
|
||||
++ optional cfg.components.imagemagick imagemagick;
|
||||
++ optional cfg.components.imagemagick imagemagick
|
||||
++ optional cfg.components.ghostscript ghostscript;
|
||||
|
||||
preStart = ''
|
||||
rm -rf "${cfg.stateDir}/plugins/"*
|
||||
|
|
Loading…
Reference in a new issue