mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 14:31:54 -05:00
34 lines
744 B
Nix
34 lines
744 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: {
|
|
config = lib.mkIf config.alyraffauf.containers.nixos.audiobookshelf.enable {
|
|
containers.audiobookshelf = {
|
|
autoStart = true;
|
|
bindMounts."/Media" = {
|
|
hostPath = config.alyraffauf.containers.nixos.audiobookshelf.mediaDirectory;
|
|
isReadOnly = false;
|
|
};
|
|
config = let
|
|
port = config.alyraffauf.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;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|