34 lines
676 B
Nix
34 lines
676 B
Nix
{
|
|
pkgs,
|
|
service_configs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
(lib.vpnNamespaceOpenPort service_configs.ports.private.bitmagnet.port "bitmagnet")
|
|
(lib.mkCaddyReverseProxy {
|
|
subdomain = "bitmagnet";
|
|
port = service_configs.ports.private.bitmagnet.port;
|
|
auth = true;
|
|
vpn = true;
|
|
})
|
|
];
|
|
|
|
services.bitmagnet = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
postgres = {
|
|
host = service_configs.postgres.socket;
|
|
};
|
|
http_server = {
|
|
# TODO! make issue about this being a string and not a `port` type
|
|
port = ":" + (builtins.toString service_configs.ports.private.bitmagnet.port);
|
|
};
|
|
};
|
|
};
|
|
|
|
}
|