service/radarr: init from legacy

This commit is contained in:
Felix Buehler 2023-03-15 22:35:46 +01:00
parent 285102dc17
commit c9311fdf4f
5 changed files with 42 additions and 22 deletions

View file

@ -0,0 +1,38 @@
# manages and downloads films
{ config, lib, pkgs, ... }:
let
cfg = config.my.services.radarr;
domain = config.networking.domain;
port = 7878;
in
{
options.my.services.radarr = with lib; {
enable = mkEnableOption "Sonarr for films management";
};
config = lib.mkIf cfg.enable {
services.radarr = {
enable = true;
};
systemd.services.radarr = {
after = [ "network-online.target" ];
};
my.services.nginx.virtualHosts = [
{
subdomain = "movies";
inherit port;
}
];
webapps.apps.radarr = {
dashboard = {
name = "Radarr";
category = "manag";
icon = "film";
link = "https://movies.${domain}";
};
};
};
}