1
0
Fork 0
dotfiles/container/autobrr/default.nix

65 lines
1.4 KiB
Nix
Raw Normal View History

2023-05-20 22:50:04 +00:00
{ lib, ... }:
{
systemd.tmpfiles.rules = [
"d /var/lib/autobrr 0755 root root"
"d /var/lib/omegabrr 0755 root root"
];
virtualisation.oci-containers.containers.autobrr = {
image = "ghcr.io/autobrr/autobrr:latest";
ports = [ "192.168.42.2:7474:7474" ];
environment = {
"TZ" = "Europe/Berlin";
};
volumes = [
"/var/lib/autobrr:/config"
];
extraOptions = [
"--network=ns:/var/run/netns/wg"
];
};
virtualisation.oci-containers.containers.omegabrr = {
image = "ghcr.io/autobrr/omegabrr:latest";
ports = [ "192.168.42.2:7441:7441" ];
volumes = [
"/var/lib/omegabrr:/config"
];
extraOptions = [
"--network=ns:/var/run/netns/wg"
];
};
systemd.services.podman-autobrr = {
bindsTo = [ "wg.service" ];
after = lib.mkForce [ "wg.service" ];
serviceConfig = {
TimeoutStopSec = lib.mkForce 10;
};
};
systemd.services.podman-omegabrr = {
bindsTo = [ "wg.service" ];
after = lib.mkForce [ "wg.service" ];
serviceConfig = {
TimeoutStopSec = lib.mkForce 10;
};
};
services.nginx.virtualHosts."autobrr.internal.kempkens.network" = {
quic = true;
http3 = true;
onlySSL = true;
useACMEHost = "internal.kempkens.network";
locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://192.168.42.2:7474";
};
};
}