knossos/services/calibre-web.nix

37 lines
1,021 B
Nix
Raw Normal View History

2025-11-08 14:18:13 +08:00
{ config, pkgs, ... }:
{
# Calibre-Web
# more options: https://mynixos.com/nixpkgs/options/services.calibre-web
services.calibre-web= {
enable = true;
listen = {
ip = "0.0.0.0";
port = 8083;
};
2026-03-28 10:14:57 +08:00
# openFirewall = true;
2025-11-08 14:18:13 +08:00
options = {
2026-03-24 15:18:58 +08:00
enableBookUploading = false;
2025-11-08 14:18:13 +08:00
enableBookConversion = true;
# No " " around absolute path
# Make sure a calibre library .db file is in this folder
# Example file: https://github.com/janeczku/calibre-web/raw/master/library/metadata.db
2026-03-28 10:14:57 +08:00
calibreLibrary ="/home/elias/nixos-knossos/books";
2025-11-08 14:18:13 +08:00
};
};
#Using Caddy on VPS. Don't need this.
services.nginx.enable = false;
# CACHE_DIRECTORY environment variable
# explanation: https://github.com/janeczku/calibre-web/issues/3343
# https://github.com/janeczku/calibre-web/issues/3278
systemd.services.calibre-web = {
environment = {
CACHE_DIR = "/var/cache/calibre-web";
};
serviceConfig = {
CacheDirectory = "calibre-web";
};
};
}