30 lines
528 B
Nix
30 lines
528 B
Nix
{ lib, config, ... }:
|
|
let
|
|
enabled = config.mod.audiobookshelf.enable;
|
|
in
|
|
{
|
|
options = {
|
|
mod.audiobookshelf = {
|
|
enable = lib.mkEnableOption "Enable audiobookshelf module";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf enabled {
|
|
users.users.audiobookshelf = {
|
|
isSystemUser = true;
|
|
description = "audiobookshelf";
|
|
group = "storage";
|
|
};
|
|
|
|
services.audiobookshelf = {
|
|
enable = true;
|
|
|
|
user = "audiobookshelf";
|
|
group = "storage";
|
|
|
|
host = "0.0.0.0";
|
|
port = 8000;
|
|
};
|
|
};
|
|
}
|