nixcfg/nixosModules/containers/nixos/audiobookshelf/default.nix

34 lines
720 B
Nix
Raw Normal View History

{
pkgs,
lib,
config,
...
}: {
config = lib.mkIf config.ar.containers.nixos.audiobookshelf.enable {
containers.audiobookshelf = {
autoStart = true;
2024-06-08 11:31:59 -04:00
bindMounts."/Media" = {
hostPath = config.ar.containers.nixos.audiobookshelf.mediaDirectory;
2024-06-08 11:31:59 -04:00
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;
};
};
};
};
}