30 lines
556 B
Nix
30 lines
556 B
Nix
{ lib, config, ... }:
|
|
let
|
|
enabled = config.mod.audiobookshelf.enable;
|
|
in
|
|
{
|
|
options = {
|
|
mod.audiobookshelf = {
|
|
enable = lib.mkEnableOption "Enable audiobookshelf module";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf enabled {
|
|
fileSystems."/home/alex/media" = {
|
|
device = "/dev/disk/by-uuid/ad4acc0f-172c-40f8-8473-777c957e8764";
|
|
fsType = "ext4";
|
|
options = [ "nofail" ];
|
|
};
|
|
|
|
services.audiobookshelf = {
|
|
enable = true;
|
|
|
|
user = "alex";
|
|
group = "users";
|
|
|
|
host = "0.0.0.0";
|
|
port = 8000;
|
|
};
|
|
};
|
|
}
|