dotfiles/nix/modules/nixos/features/homelab/audiobookshelf.nix

27 lines
525 B
Nix
Raw Normal View History

2024-12-26 00:13:42 +00:00
{ config, lib, ... }:
2024-12-14 20:19:42 +00:00
2024-12-26 00:13:42 +00:00
with lib;
let
cfg = config.features.homelab.audiobookshelf;
in
2024-12-14 20:19:42 +00:00
{
2024-12-26 00:13:42 +00:00
options.features.homelab.audiobookshelf.enable = mkEnableOption "Enable audiobookshelf";
2024-12-14 20:19:42 +00:00
2024-12-26 00:13:42 +00:00
config = mkIf cfg.enable {
services = {
audiobookshelf = {
enable = true;
2024-12-26 00:13:42 +00:00
port = 4001;
};
2024-12-14 20:19:42 +00:00
caddy.virtualHosts."audiobookshelf.opdavies.uk" = {
useACMEHost = "opdavies.uk";
2024-12-14 20:19:42 +00:00
extraConfig = "reverse_proxy localhost:${toString config.services.audiobookshelf.port}";
2024-12-14 20:19:42 +00:00
};
};
};
}