aux-config/modules/nixos/services/nas/audiobookshelf.nix
kB01 57a2d11ae6
Some checks are pending
/ Check NixOS Configuration (push) Waiting to run
Added Configuration for Audiobookshelf (does not evaluate yet)
2024-11-29 03:15:56 +01:00

29 lines
648 B
Nix

{
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;
http.routers.audiobookshelf.rule = "Host(`audiobookshelf.U3ncSovm`)";
http.routers.audiobookshelf.service = "audiobookshelf";
services.audiobookshelf.loadBalancer.servers = [ { url = "http://localhost:63001"; } ];
};
};
}