23 lines
443 B
Nix
23 lines
443 B
Nix
{
|
|
lib,
|
|
config,
|
|
inputs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.servers.audiobookshelf;
|
|
in
|
|
{
|
|
options.my.servers.audiobookshelf =
|
|
inputs.self.lib.mkServerOptions "audiobookshelf" "audiobooks" 5687
|
|
lib;
|
|
config = lib.mkIf (cfg.enable && config.my.secureHost) {
|
|
my.servers.audiobookshelf.enableSocket = true;
|
|
services.audiobookshelf = {
|
|
inherit (cfg) enable port;
|
|
host = cfg.ip;
|
|
group = "piracy";
|
|
};
|
|
};
|
|
}
|