diff --git a/services/Caddyfile b/services/Caddyfile new file mode 100644 index 0000000..9d6c9d8 --- /dev/null +++ b/services/Caddyfile @@ -0,0 +1,29 @@ +{ + email tootbrute@tutanota.com +} + + +*.home.mydomain.com { + + vars { + # IP address of My Tailscale Server + tailscale_ip 100.95.204.90 + } + + tls { + dns gandi c7fd5d10953bb72845dbb4668c8f459d111e609c + } + + @jellyfin host jellyfin.home.mydomain.com + handle @jellyfin { + reverse_proxy {vars.tailscale_ip}:8096 + } + @books host books.home.mydomain.com + handle @books { + reverse_proxy {vars.tailscale_ip}:8083 + } + # Fallback for otherwise unhandled domains + handle { + abort + } +} diff --git a/services/caddy.nix b/services/caddy.nix index f53d9f0..786de97 100644 --- a/services/caddy.nix +++ b/services/caddy.nix @@ -6,12 +6,8 @@ services.caddy = { package = pkgs.caddy.withPlugins { plugins = [ "github.com/caddy-dns/gandi@v1.1.0" ]; hash = "sha256-5mjD0CY7f5+sRtV1rXysj8PvId2gQaWiXlIaTg2Lv8A="; + configFile = ./services/Caddyfile; }; - - virtualHosts."localhost".extraConfig = '' - respond "Hello, world!" - ''; - }; } diff --git a/services/calibre-web.nix b/services/calibre-web.nix index ab540f9..7000f60 100644 --- a/services/calibre-web.nix +++ b/services/calibre-web.nix @@ -11,12 +11,12 @@ }; openFirewall = true; options = { - enableBookUploading = true; + enableBookUploading = false; enableBookConversion = true; # No " " around absolute path # Make sure a calibre library .db file is in this folder # Example file: https://github.com/janeczku/calibre-web/raw/master/library/metadata.db - calibreLibrary =/home/elias/books; + calibreLibrary =/mnt/plakias/enc/books; }; };