38 lines
1,004 B
Nix
38 lines
1,004 B
Nix
{ 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;
|
|
};
|
|
openFirewall = true;
|
|
options = {
|
|
enableBookUploading = true;
|
|
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
|
|
calibreLibrary =/home/elias/books;
|
|
};
|
|
};
|
|
|
|
#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";
|
|
};
|
|
};
|
|
|
|
}
|