2022-04-05 13:04:53 +01:00
|
|
|
{ lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
domain = "books.giugl.io";
|
|
|
|
network = import ./network.nix;
|
|
|
|
in {
|
|
|
|
services = {
|
|
|
|
calibre-web = {
|
|
|
|
enable = true;
|
|
|
|
group = "media";
|
|
|
|
options = {
|
|
|
|
enableBookConversion = true;
|
|
|
|
enableBookUploading = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nginx.virtualHosts.${domain} = {
|
2022-10-11 20:29:58 +01:00
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
2022-04-05 13:04:53 +01:00
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:8083";
|
|
|
|
extraConfig = ''
|
2022-10-11 20:29:58 +01:00
|
|
|
client_max_body_size 500M;
|
2022-04-05 13:04:53 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.extraHosts = ''
|
|
|
|
${network.architect-lan} ${domain}
|
|
|
|
${network.architect-wg} ${domain}
|
|
|
|
'';
|
|
|
|
|
|
|
|
users.groups.media.members = [ "calibre-web" ];
|
|
|
|
}
|