layne: setup bazarr

This commit is contained in:
Adithya 2024-11-01 16:55:22 +05:30
parent 6630be7451
commit 3f0820e577
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
3 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,34 @@
{ pkgs, lib, ... }:
let
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
user = "mediaserver";
group = "mediaserver";
dataDir = "/mnt/data/bazarr";
port = 6767;
in
{
services.caddy.virtualHosts."bazarr.labs.adtya.xyz" = {
inherit logFormat;
extraConfig = ''
reverse_proxy 127.0.0.1:${toString port}
'';
};
systemd.tmpfiles.settings."10-bazarr".${dataDir}.d = {
inherit user group;
mode = "0700";
};
systemd.services.bazarr = {
description = "Bazarr";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = user;
Group = group;
ExecStart = "${lib.getExe pkgs.bazarr} --port ${toString port} --config '${dataDir}'";
Restart = "on-failure";
};
};
}

View file

@ -6,6 +6,7 @@ _: {
./sonarr.nix ./sonarr.nix
./readarr.nix ./readarr.nix
./prowlarr.nix ./prowlarr.nix
./bazarr.nix
../../../shared/prometheus-exporters.nix ../../../shared/prometheus-exporters.nix
../../../shared/promtail.nix ../../../shared/promtail.nix
]; ];

View file

@ -67,6 +67,7 @@
# Services # Services
"alertmanager.labs.adtya.xyz" = "10.10.10.12"; "alertmanager.labs.adtya.xyz" = "10.10.10.12";
"act-cache.labs.adtya.xyz" = "10.10.10.13"; "act-cache.labs.adtya.xyz" = "10.10.10.13";
"bazarr.labs.adtya.xyz" = "10.10.10.14";
"blocky.rico1.labs.adtya.xyz" = "10.10.10.11"; "blocky.rico1.labs.adtya.xyz" = "10.10.10.11";
"blocky.rico2.labs.adtya.xyz" = "10.10.10.12"; "blocky.rico2.labs.adtya.xyz" = "10.10.10.12";
"grafana.labs.adtya.xyz" = "10.10.10.12"; "grafana.labs.adtya.xyz" = "10.10.10.12";