flake/hosts/tyo0/services/wastebin.nix

21 lines
463 B
Nix
Raw Normal View History

2024-09-06 12:19:44 +00:00
{ lib, config, ... }:
let
port = config.lib.ports.wastebin;
in
2024-08-27 09:08:53 +00:00
{
services.wastebin = {
enable = true;
2024-09-06 12:19:44 +00:00
settings.WASTEBIN_ADDRESS_PORT = "127.0.0.1:${toString port}";
2024-08-27 09:08:53 +00:00
};
2024-08-31 02:15:09 +00:00
services.caddy.settings.apps.http.servers.srv0.routes = lib.singleton {
match = lib.singleton {
host = [ "pb.ny4.dev" ];
};
handle = lib.singleton {
handler = "reverse_proxy";
2024-09-06 12:19:44 +00:00
upstreams = [ { dial = "localhost:${toString port}"; } ];
2024-08-31 02:15:09 +00:00
};
};
2024-08-27 09:08:53 +00:00
}