nixos/modules/services/bazarr/default.nix

39 lines
765 B
Nix
Raw Normal View History

2023-03-15 22:37:27 +01:00
# 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}";
};
};
};
}