diff --git a/appserver/audiobook.nix b/appserver/audiobook.nix index e158029..8c90e39 100644 --- a/appserver/audiobook.nix +++ b/appserver/audiobook.nix @@ -1,34 +1,11 @@ { configs, pkgs, ... }: -let - audioBookShelfPort = 8000; -in { environment.systemPackages = [ pkgs.audiobookshelf ]; - systemd.services = { - audiobookshelf = { - description = "Audiobookshelf"; - wantedBy = ["multi-user.target"]; - restartIfChanged = true; - environment = { - PORT = builtins.toString audioBookShelfPort; - HOST = "0.0.0.0"; - }; - serviceConfig = { - Type = "simple"; - Restart = "always"; - RestartSec = "5"; - ExecStart = '' - ${pkgs.audiobookshelf}/bin/audiobookshelf - ''; - }; - }; - }; services.audiobookshelf.group = "users"; - networking.firewall.allowedTCPPorts = [ audioBookShelfPort ]; - #services.audiobookshelf.enable = true; - #services.audiobookshelf.host = 0.0.0.0 ; - #services.audiobookshelf.port = 8000; - #services.audiobookshelf.openFirewall = true; + services.audiobookshelf.enable = true; + services.audiobookshelf.host = 0.0.0.0 ; + services.audiobookshelf.port = 8000; + services.audiobookshelf.openFirewall = true; }