Add audiobookshelf

The package, a systetmd service and open the port.
This commit is contained in:
Alexander Wainwright
2025-06-29 22:35:05 +10:00
parent 7f12233f41
commit 7610e83b87
2 changed files with 26 additions and 3 deletions

View File

@@ -19,15 +19,38 @@
privileged = true;
};
networking.firewall.allowedTCPPorts = [ 8000 8080 9117 8191 ];
networking.firewall.allowedTCPPorts = [
8000
8010
8080
9117
8191
];
networking.hostName = "alt"; # Define your hostname.
environment.systemPackages = with pkgs; [
audiobookshelf
flaresolverr
filebrowser
];
# run audiobookshelf
systemd.services.audiobookshelf = {
description = "Audiobookshelf server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = "alex";
WorkingDirectory = "/home/alex/audiobookshelf";
ExecStart = "${pkgs.audiobookshelf}/bin/audiobookshelf --port 8010";
Restart = "on-failure";
RestartSec = "5s";
};
};
# run filebrowser
systemd.services.filebrowser = {
description = "Filebrowser server";

View File

@@ -12,9 +12,9 @@ let
};
mounts = {
"/mnt/kafka/archive" = "//kafka.local/archive";
"/mnt/kafka/downloads" = "//kafka.local/downloads";
"/mnt/kafka/backup" = "//kafka.local/backup";
"/mnt/kafka/video" = "//kafka.local/video";
"/mnt/kafka/books" = "//kafka.local/books";
"/mnt/kafka/downloads" = "//kafka.local/downloads";
};
in
{