35 lines
769 B
Nix
35 lines
769 B
Nix
{ config, secrets, ... }:
|
|
{
|
|
sops.secrets.autobrr = {
|
|
sopsFile = "${secrets}/autobrr.yaml";
|
|
key = "key";
|
|
format = "yaml";
|
|
};
|
|
|
|
services.nginx = {
|
|
virtualHosts."autobrr.donsz.nl" = {
|
|
forceSSL = true;
|
|
http2 = true;
|
|
enableACME = true;
|
|
|
|
locations."/" = {
|
|
proxyPass = "http://${config.services.autobrr.settings.host}:${toString config.services.autobrr.settings.port}";
|
|
};
|
|
};
|
|
};
|
|
|
|
services.oauth2-proxy.nginx.virtualHosts."autobrr.donsz.nl" = {
|
|
allowed_groups = [ "torrent" ];
|
|
};
|
|
|
|
services.autobrr = {
|
|
enable = true;
|
|
settings = {
|
|
logLevel = "DEBUG";
|
|
checkForUpdates = false;
|
|
host = "[::1]";
|
|
port = 11012;
|
|
};
|
|
secretFile = config.sops.secrets.autobrr.path;
|
|
};
|
|
}
|