service/sonarr: init from legacy

This commit is contained in:
Felix Buehler 2023-03-15 22:34:36 +01:00
parent bc32120c7d
commit 285102dc17
5 changed files with 43 additions and 22 deletions

View file

@ -1,21 +0,0 @@
{ config, pkgs, ... }:
{
services.sonarr = {
enable = true;
openFirewall = true;
};
systemd.services.sonarr = {
after = [ "network-online.target" ];
#unitConfig.RequiresMountsFor = [ "/storage" ];
};
webapps.apps.sonarr = {
dashboard = {
name = "Sonarr";
category = "manag";
icon = "tv";
link = "http://192.168.178.60:8989";
};
};
}

View file

@ -12,7 +12,6 @@
../../legacy/modules/webapps/bazarr.nix
../../legacy/modules/webapps/prowlarr.nix
../../legacy/modules/webapps/radarr.nix
../../legacy/modules/webapps/sonarr.nix
];
networking.hostName = "serverle";

View file

@ -20,6 +20,10 @@ in
sshKeyFile = secrets."borgbackup/ssh_key".path;
};
sonarr = {
enable = true;
};
ssh-server = {
enable = true;
};

View file

@ -20,6 +20,7 @@
./passworts
./photoprism
./rss-bridge
./sonarr
./ssh-server
./tandoor-recipes
];

View file

@ -0,0 +1,38 @@
# 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 = {
name = "Sonarr";
category = "manag";
icon = "tv";
link = "https://series.${domain}";
};
};
};
}