2
2
mirror of https://git.feal.no/felixalb/nixos-config.git synced 2024-12-23 04:27:31 +01:00
nixos-config/hosts/voyager/services/calibre.nix

41 lines
981 B
Nix
Raw Normal View History

2023-06-09 22:34:46 +02:00
{ config, lib, pkgs, ... }:
let
domain = "books.home.feal.no";
storage = "/tank/media/books";
cfg = config.services.calibre-web;
in {
services = {
nginx.virtualHosts.${domain} = {
2024-05-31 16:48:33 +02:00
locations = {
"/".proxyPass = "http://${cfg.listen.ip}:${toString cfg.listen.port}";
"/opds".proxyPass = "http://${cfg.listen.ip}:${toString cfg.listen.port}";
};
extraConfig = ''
client_max_body_size 512M;
proxy_busy_buffers_size 512k;
proxy_buffers 4 512k;
proxy_buffer_size 256k;
'';
2023-06-09 22:34:46 +02:00
};
calibre-server = {
enable = true;
user = "calibre-server";
libraries = [ storage ];
};
calibre-web = {
enable = true;
user = "calibre-server";
listen.ip = "127.0.0.1";
listen.port = 5010;
options = {
calibreLibrary = storage;
enableBookConversion = true;
2024-05-31 16:48:33 +02:00
enableKepubify = true;
2023-06-09 22:34:46 +02:00
enableBookUploading = true;
};
};
};
}