diff --git a/sys/platforms/vps/srv/calibre-web.nix b/sys/platforms/vps/srv/calibre-web.nix new file mode 100644 index 0000000..7432ae3 --- /dev/null +++ b/sys/platforms/vps/srv/calibre-web.nix @@ -0,0 +1,31 @@ +{ + lib, + pkgs, + ... +}: +with lib; { + services = { + nginx = { + virtualHosts."calibre.posixlycorrect.com" = { + enableACME = true; + forceSSL = true; + extraConfig = '' + proxy_headers_hash_max_size 512; + proxy_headers_hash_bucket_size 128; + ''; + locations."/" = { + proxyPass = "http://[::1]:8083"; + }; + }; + }; + + calibre-web = { + enable = true; + openFirewall = true; + options = { + enableBookUploading = true; + calibreLibrary = "/var/lib/calibre-web/calibre_library"; + }; + }; + }; +} diff --git a/sys/platforms/vps/srv/default.nix b/sys/platforms/vps/srv/default.nix index eb607a1..29c4bf3 100644 --- a/sys/platforms/vps/srv/default.nix +++ b/sys/platforms/vps/srv/default.nix @@ -16,5 +16,6 @@ with lib; { ./trilium.nix ./syncthing.nix ./shiori.nix + ./calibre-web.nix ]; }