2024-11-29 03:15:56 +01:00
|
|
|
{
|
|
|
|
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`)";
|
2024-11-29 03:15:56 +01:00
|
|
|
http.routers.audiobookshelf.service = "audiobookshelf";
|
2024-11-30 02:19:06 +01:00
|
|
|
services.audiobookshelf.loadBalancer.servers = [ { url = "http://localhost:63001/"; } ];
|
2024-11-29 03:15:56 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|