nixos/modules/services/sonarr/default.nix

39 lines
736 B
Nix
Raw Normal View History

2023-03-15 22:34:36 +01:00
# manages and downloads series
{ config, lib, pkgs, ... }:
let
cfg = config.my.services.sonarr;
domain = config.networking.domain;
port = 8989;
in
{
options.my.services.sonarr = with lib; {
enable = mkEnableOption "Sonarr for series management";
};
config = lib.mkIf cfg.enable {
services.sonarr = {
enable = true;
};
systemd.services.sonarr = {
after = [ "network-online.target" ];
};
my.services.nginx.virtualHosts = [
{
subdomain = "series";
inherit port;
}
];
webapps.apps.sonarr = {
dashboard = {
2023-04-02 17:50:15 +02:00
name = "Series";
2023-04-02 17:43:28 +02:00
category = "media";
2023-03-15 22:34:36 +01:00
icon = "tv";
link = "https://series.${domain}";
};
};
};
}