diff --git a/rpi4.nix b/rpi4.nix index 61a1cb9..d23f3e1 100644 --- a/rpi4.nix +++ b/rpi4.nix @@ -30,6 +30,7 @@ in with builtins; { ./services/miniflux.nix ./services/paperless.nix ./services/nextcloud.nix + ./services/calibre-web.nix ]; age.secrets.cloudflare.file = ./secrets/cloudflare.age; @@ -73,6 +74,7 @@ in with builtins; { "cloud.felschr.com" "office.felschr.com" "media.felschr.com" + "books.felschr.com" "news.felschr.com" "mqtt.felschr.com" "owntracks.felschr.com" diff --git a/services/calibre-web.nix b/services/calibre-web.nix new file mode 100644 index 0000000..254f985 --- /dev/null +++ b/services/calibre-web.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: + +let port = 8083; +in { + services.calibre-web = { + enable = true; + listen.port = port; + options.calibreLibrary = "/media/Books"; + }; + + services.nginx = { + virtualHosts."books.felschr.com" = { + enableACME = true; + forceSSL = true; + locations."/".proxyPass = "http://localhost:${toString port}"; + }; + }; +}