mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-23 05:43:55 -05:00
34 lines
720 B
Nix
34 lines
720 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: {
|
|
config = lib.mkIf config.ar.containers.nixos.audiobookshelf.enable {
|
|
containers.audiobookshelf = {
|
|
autoStart = true;
|
|
bindMounts."/Media" = {
|
|
hostPath = config.ar.containers.nixos.audiobookshelf.mediaDirectory;
|
|
isReadOnly = false;
|
|
};
|
|
config = let
|
|
port = config.ar.containers.nixos.audiobookshelf.port;
|
|
in
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
system.stateVersion = "24.05";
|
|
services.audiobookshelf = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
host = "0.0.0.0";
|
|
port = port;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|