Files
nixos-configs/hosts/manatee/modules/audiobookshelf/default.nix
Alexander Heldt 65569f6b57 manatee: Add services homepage with auto-discovery
Add a homepage module that generates a static landing page served on
port 9999 via nginx. Each service module registers itself via the shared
mod.homepage.services option, so enabling a module automatically adds
it to the page.
2026-02-28 22:03:12 +01:00

36 lines
663 B
Nix

{ lib, config, ... }:
let
enabled = config.mod.audiobookshelf.enable;
in
{
options = {
mod.audiobookshelf = {
enable = lib.mkEnableOption "Enable audiobookshelf module";
};
};
config = lib.mkIf enabled {
mod.homepage.services = [{
name = "Audiobookshelf";
port = 8000;
description = "Audiobooks & podcasts";
}];
users.users.audiobookshelf = {
isSystemUser = true;
description = "audiobookshelf";
group = "storage";
};
services.audiobookshelf = {
enable = true;
user = "audiobookshelf";
group = "storage";
host = "0.0.0.0";
port = 8000;
};
};
}