Compare commits

..

No commits in common. "e6dbed2e17182769249add38366b324655246193" and "2aea76c0e395023c9835cf8d5a1d7da64c5850d6" have entirely different histories.

5 changed files with 1 additions and 86 deletions

View File

@ -42,7 +42,6 @@ nixpkgs.lib.nixosSystem {
streamServer = "stream.masu.rs";
nextcloudServer = "cloud.masu.rs";
bookServer = "books.masu.rs";
arrServer = "download.masu.rs";
samba.enable = true;
backup.s3 = {

View File

@ -1,71 +0,0 @@
{ config, lib, ... }:
{
options = {
arrServer = lib.mkOption {
type = lib.types.str;
description = "Hostname for arr services";
default = null;
};
};
config = lib.mkIf (config.arrServer != null) {
services.sonarr.enable = true;
services.radarr.enable = true;
services.bazarr.enable = true;
services.prowlarr.enable = true;
# Requires updating the base_url config value in each service
# If you try to rewrite the URL, the service won't redirect properly
caddy.routes = [
{
group = "download";
match = [{
host = [ config.arrServer ];
path = [ "/sonarr*" ];
}];
handle = [{
handler = "reverse_proxy";
upstreams = [{ dial = "localhost:8989"; }];
}];
}
{
group = "download";
match = [{
host = [ config.arrServer ];
path = [ "/radarr*" ];
}];
handle = [{
handler = "reverse_proxy";
upstreams = [{ dial = "localhost:7878"; }];
}];
}
{
group = "download";
match = [{
host = [ config.arrServer ];
path = [ "/prowlarr*" ];
}];
handle = [{
handler = "reverse_proxy";
upstreams = [{ dial = "localhost:9696"; }];
}];
}
{
group = "download";
match = [{
host = [ config.arrServer ];
path = [ "/bazarr*" ];
}];
handle = [{
handler = "reverse_proxy";
upstreams = [{ dial = "localhost:6767"; }];
}];
}
];
};
}

View File

@ -24,16 +24,6 @@
listen = [ ":443" ];
routes = config.caddy.routes;
errors.routes = config.caddy.blocks;
# logs = { }; # Uncomment to collect access logs
};
logging.logs.main = {
encoder = { format = "console"; };
writer = {
output = "file";
filename = "${config.services.caddy.logDir}/caddy.log";
roll = true;
};
level = "INFO";
};
});

View File

@ -1,7 +1,6 @@
{ ... }: {
imports = [
./arr.nix
./backups.nix
./caddy.nix
./calibre.nix

View File

@ -41,9 +41,7 @@
};
# Create reverse proxy for web UI
caddy.routes = lib.mkAfter [{
group =
lib.mkIf (config.arrServer == config.transmissionServer) "download";
caddy.routes = [{
match = [{ host = [ config.transmissionServer ]; }];
handle = [{
handler = "reverse_proxy";