17 lines
465 B
Nix
17 lines
465 B
Nix
{ lib, config, ... }:
|
|
let
|
|
cfg = config.my.servers.audiobookshelf;
|
|
setup = import ../factories/mkserver.nix { inherit lib config; };
|
|
in
|
|
{
|
|
options.my.servers.audiobookshelf = setup.mkOptions "audiobookshelf" "audiobooks" 5687;
|
|
config = lib.mkIf (cfg.enable && config.my.secureHost) {
|
|
my.servers.audiobookshelf.enableSocket = true;
|
|
services.audiobookshelf = {
|
|
inherit (cfg) enable port;
|
|
host = cfg.ip;
|
|
group = "piracy";
|
|
};
|
|
};
|
|
}
|