aux-config/modules/nixos/services/nas/audiobookshelf.nix

30 lines
650 B
Nix
Raw Normal View History

{
inputs,
config,
lib,
pkgs,
system,
...
}:
let
cfg = config.services.nas;
in
{
config = lib.mkIf (cfg.enable && cfg.servers.audiobookshelf.enable) {
services.audiobookshelf = {
enable = true;
port = 63001;
};
services.traefik.dynamicConfigOptions = {
http.routers.audiobookshelf.entrypoints = "websecure";
http.routers.audiobookshelf.tls = true;
2024-11-30 02:19:06 +01:00
http.routers.audiobookshelf.rule = "Host(`audiobookshelf.localhost`)";
http.routers.audiobookshelf.service = "audiobookshelf";
2024-11-30 02:19:06 +01:00
services.audiobookshelf.loadBalancer.servers = [ { url = "http://localhost:63001/"; } ];
};
};
}