kilgharrah: serve audiobookshelf

This commit is contained in:
Katherina Walshe-Grey 2024-10-15 22:51:46 +01:00
parent 21fa41876a
commit 0ef661aae7
4 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.qenya.services.audiobookshelf;
in
{
options.qenya.services.audiobookshelf = {
enable = mkEnableOption "Audiobookshelf";
domain = mkOption {
type = types.str;
};
};
config = mkIf cfg.enable {
services.nginx = {
enable = true;
virtualHosts = {
${cfg.domain} = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:8234/";
};
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.audiobookshelf.enable = true;
services.audiobookshelf.port = 8234;
};
}

View file

@ -1,6 +1,7 @@
{
imports = [
./actual.nix
./audiobookshelf.nix
./forgejo.nix
./jellyfin.nix
./navidrome.nix