nixos/hosts/architect/calibre.nix
2022-10-11 21:29:58 +02:00

36 lines
689 B
Nix

{ 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} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8083";
extraConfig = ''
client_max_body_size 500M;
'';
};
};
};
networking.extraHosts = ''
${network.architect-lan} ${domain}
${network.architect-wg} ${domain}
'';
users.groups.media.members = [ "calibre-web" ];
}