diff options
author | Wietse de Vries <wietsedvries@gmail.com> | 2023-08-26 15:31:22 +0200 |
---|---|---|
committer | Wietse de Vries <wietsedvries@gmail.com> | 2023-08-27 15:25:17 +0200 |
commit | 2c622185a7f9d81ae92490d881c46b26e9f94e58 (patch) | |
tree | f37b9a1cf0efaba4dbb40ed3129a4cf4b6901432 | |
parent | f814e24fc14c66ca272fd4e7f3ea55eda73d4941 (diff) | |
download | nixpkgs-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar nixpkgs-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.gz nixpkgs-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.bz2 nixpkgs-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.lz nixpkgs-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.xz nixpkgs-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.zst nixpkgs-2c622185a7f9d81ae92490d881c46b26e9f94e58.zip |
nixos/calibre-web: add package and enableKepubify options
-rw-r--r-- | nixos/modules/services/web-apps/calibre-web.nix | 7 | ||||
-rw-r--r-- | pkgs/servers/calibre-web/default.nix | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/calibre-web.nix b/nixos/modules/services/web-apps/calibre-web.nix index 143decfc091..80567db10c9 100644 --- a/nixos/modules/services/web-apps/calibre-web.nix +++ b/nixos/modules/services/web-apps/calibre-web.nix @@ -10,6 +10,8 @@ in services.calibre-web = { enable = mkEnableOption (lib.mdDoc "Calibre-Web"); + package = lib.mkPackageOption pkgs "calibre-web" { }; + listen = { ip = mkOption { type = types.str; @@ -73,6 +75,8 @@ in ''; }; + enableKepubify = mkEnableOption (lib.mdDoc "kebup conversion support"); + enableBookUploading = mkOption { type = types.bool; default = false; @@ -106,7 +110,7 @@ in systemd.services.calibre-web = let appDb = "/var/lib/${cfg.dataDir}/app.db"; gdriveDb = "/var/lib/${cfg.dataDir}/gdrive.db"; - calibreWebCmd = "${pkgs.calibre-web}/bin/calibre-web -p ${appDb} -g ${gdriveDb}"; + calibreWebCmd = "${cfg.package}/bin/calibre-web -p ${appDb} -g ${gdriveDb}"; settings = concatStringsSep ", " ( [ @@ -117,6 +121,7 @@ in ] ++ optional (cfg.options.calibreLibrary != null) "config_calibre_dir = '${cfg.options.calibreLibrary}'" ++ optional cfg.options.enableBookConversion "config_converterpath = '${pkgs.calibre}/bin/ebook-convert'" + ++ optional cfg.options.enableKepubify "config_kepubifypath = '${pkgs.kepubify}/bin/kepubify'" ); in { diff --git a/pkgs/servers/calibre-web/default.nix b/pkgs/servers/calibre-web/default.nix index 607ced4606f..be0df48450f 100644 --- a/pkgs/servers/calibre-web/default.nix +++ b/pkgs/servers/calibre-web/default.nix @@ -44,6 +44,7 @@ python.pkgs.buildPythonApplication rec { flask-wtf flask-limiter iso-639 + jsonschema lxml pypdf requests |