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 /nixos | |
parent | f814e24fc14c66ca272fd4e7f3ea55eda73d4941 (diff) | |
download | nixlib-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar nixlib-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.gz nixlib-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.bz2 nixlib-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.lz nixlib-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.xz nixlib-2c622185a7f9d81ae92490d881c46b26e9f94e58.tar.zst nixlib-2c622185a7f9d81ae92490d881c46b26e9f94e58.zip |
nixos/calibre-web: add package and enableKepubify options
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-apps/calibre-web.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/calibre-web.nix b/nixos/modules/services/web-apps/calibre-web.nix index 143decfc0917..80567db10c97 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 { |