2022-05-29 17:26:10 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2022-05-29 17:45:05 +02:00
|
|
|
let port = 8088;
|
2022-05-29 17:26:10 +02:00
|
|
|
in {
|
|
|
|
services.calibre-web = {
|
|
|
|
enable = true;
|
2022-05-29 17:55:57 +02:00
|
|
|
listen.ip = "::1";
|
2022-05-29 17:26:10 +02:00
|
|
|
listen.port = port;
|
2022-05-29 17:55:57 +02:00
|
|
|
options.enableBookUploading = true;
|
|
|
|
options.enableBookConversion = true;
|
2022-05-29 17:26:10 +02:00
|
|
|
options.calibreLibrary = "/media/Books";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
virtualHosts."books.felschr.com" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2022-05-29 17:55:57 +02:00
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://[::1]:${toString port}";
|
|
|
|
extraConfig = ''
|
|
|
|
client_max_body_size 100M;
|
|
|
|
'';
|
|
|
|
};
|
2022-05-29 17:26:10 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|