dotfiles/nix/modules/nixos/features/homelab/audiobookshelf.nix
Oliver Davies 07fde36fb0 Homelab updates
- Change domain to opdavies.uk as this works with HTTPS/SSL.
- Switch Nginx to Caddy.
2025-01-01 14:46:27 +00:00

27 lines
525 B
Nix

{ config, lib, ... }:
with lib;
let
cfg = config.features.homelab.audiobookshelf;
in
{
options.features.homelab.audiobookshelf.enable = mkEnableOption "Enable audiobookshelf";
config = mkIf cfg.enable {
services = {
audiobookshelf = {
enable = true;
port = 4001;
};
caddy.virtualHosts."audiobookshelf.opdavies.uk" = {
useACMEHost = "opdavies.uk";
extraConfig = "reverse_proxy localhost:${toString config.services.audiobookshelf.port}";
};
};
};
}