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
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