mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
service/sonarr: init from legacy
This commit is contained in:
parent
bc32120c7d
commit
285102dc17
5 changed files with 43 additions and 22 deletions
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -12,7 +12,6 @@
|
||||||
../../legacy/modules/webapps/bazarr.nix
|
../../legacy/modules/webapps/bazarr.nix
|
||||||
../../legacy/modules/webapps/prowlarr.nix
|
../../legacy/modules/webapps/prowlarr.nix
|
||||||
../../legacy/modules/webapps/radarr.nix
|
../../legacy/modules/webapps/radarr.nix
|
||||||
../../legacy/modules/webapps/sonarr.nix
|
|
||||||
];
|
];
|
||||||
networking.hostName = "serverle";
|
networking.hostName = "serverle";
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,10 @@ in
|
||||||
sshKeyFile = secrets."borgbackup/ssh_key".path;
|
sshKeyFile = secrets."borgbackup/ssh_key".path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sonarr = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
ssh-server = {
|
ssh-server = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
./passworts
|
./passworts
|
||||||
./photoprism
|
./photoprism
|
||||||
./rss-bridge
|
./rss-bridge
|
||||||
|
./sonarr
|
||||||
./ssh-server
|
./ssh-server
|
||||||
./tandoor-recipes
|
./tandoor-recipes
|
||||||
];
|
];
|
||||||
|
|
38
modules/services/sonarr/default.nix
Normal file
38
modules/services/sonarr/default.nix
Normal 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}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue