service/bazarr: init from legacy

This commit is contained in:
Felix Buehler 2023-03-15 22:37:27 +01:00
parent 38d30d725b
commit 9edf198411
5 changed files with 42 additions and 22 deletions

View file

@ -0,0 +1,38 @@
# manages and downloads subtitles
{ config, lib, pkgs, ... }:
let
cfg = config.my.services.bazarr;
domain = config.networking.domain;
port = 6767;
in
{
options.my.services.bazarr = with lib; {
enable = mkEnableOption "Bazarr for subtitle management";
};
config = lib.mkIf cfg.enable {
services.bazarr = {
enable = true;
};
systemd.services.bazarr = {
after = [ "network-online.target" ];
};
my.services.nginx.virtualHosts = [
{
subdomain = "subtitles";
inherit port;
}
];
webapps.apps.bazarr = {
dashboard = {
name = "Subtitles";
category = "manag";
icon = "closed-captioning";
link = "https://subtitles.${domain}";
};
};
};
}