hostnames and user settings

This commit is contained in:
Noah Masur
2025-02-08 12:58:06 -05:00
parent 9c5de4c54f
commit 61b1ceffd9
45 changed files with 253 additions and 275 deletions

View File

@ -1,7 +1,7 @@
# Calibre-web is an E-Book library and management tool.
# - Exposed to the public via Caddy.
# - Hostname defined with config.hostnames.books
# - Hostname defined with hostnames.books
# - File directory backed up to S3 on a cron schedule.
{
@ -14,6 +14,7 @@
let
cfg = config.nmasur.presets.services.calibre-web;
hostnames = config.nmasur.settings.hostnames;
libraryPath = "/data/books";
in
{
@ -38,7 +39,7 @@ in
# Allow web traffic to Caddy
caddy.routes = [
{
match = [ { host = [ config.hostnames.books ]; } ];
match = [ { host = [ hostnames.books ]; } ];
handle = [
{
handler = "reverse_proxy";
@ -54,7 +55,7 @@ in
];
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ config.hostnames.books ];
services.cloudflare-dyndns.domains = [ hostnames.books ];
# Grant user access to Calibre directories
users.users.${config.user}.extraGroups = [ "calibre-web" ];