From 5fad8e6c93be7c43ba4216886e8e24a2fa622e42 Mon Sep 17 00:00:00 2001 From: Anish L Date: Wed, 31 Aug 2022 18:37:47 +1000 Subject: [PATCH] configure calibre-web / server module --- profiles/calibre/default.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 profiles/calibre/default.nix diff --git a/profiles/calibre/default.nix b/profiles/calibre/default.nix new file mode 100644 index 00000000..9bbfd24d --- /dev/null +++ b/profiles/calibre/default.nix @@ -0,0 +1,32 @@ +{ + services.calibre-web = { + enable = true; + listen.port = 8083; + openFirewall = true; + user = "calibre"; + group = "calibre"; + options = { + calibreLibrary = "/data/books"; + enableBookUploading = true; + }; + }; + + services.calibre-server = { + enable = true; + libraries = [ "/data/books" ]; + user = "calibre"; + group = "calibre"; + }; + + services.nginx.virtualHosts."books.mossnet.lan" = { + enableACME = false; + forceSSL = false; + + locations."/" = { + extraConfig = '' + proxy_pass http://localhost:8083/; + proxy_set_header X-Forwarded-Host $host; + ''; + }; + }; +}