33 lines
799 B
Nix
33 lines
799 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let cfg = config.sydnix.deertopia.servarr.sonarr;
|
|
in {
|
|
options.sydnix.deertopia.servarr.sonarr = {
|
|
enable = lib.mkEnableOption "Sonarr (via Nixarr)";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
nixarr.sonarr = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
|
|
sydnix.deertopia.nginx.vhosts."sonarr" = {
|
|
directory = null;
|
|
vhost = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
extraConfig = ''
|
|
# include ${../authelia/authelia-location.conf};
|
|
set $upstream http://127.0.0.1:8989;
|
|
'';
|
|
locations."/".extraConfig = ''
|
|
# include ${../authelia/authelia-authrequest.conf};
|
|
# include ${../authelia/proxy.conf};
|
|
proxy_pass $upstream;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|