{ network.description = "Cryto"; osmium = { config, lib, pkgs, ... }@args: let pastebinStream = (import ../applications/pastebin-stream.nix) args; generateCaddyConfiguration = (import ../lib/generate/caddy-configuration.nix) args; in let proxiedApplications = [{ hostname = "pastebin-stream-dev.cryto.net"; tls = true; proxyTarget = "http://localhost:3000"; }]; in { imports = [ (pastebinStream { errorPath = "/var/lib/pastebin-stream/errors"; rev = "3b7f6ea4ad663b82e7cfd95ae3c65f1a32f0cb0a"; sha256 = "0w29rwgkjpd9cl42z0n2fy5is730db3mfsqvjmxa7x65nz34d3wj"; }) ]; services.caddy = { enable = true; agree = true; email = "admin@cryto.net"; config = '' ${generateCaddyConfiguration proxiedApplications} ''; }; services.node-pastebin-stream = { enable = true; errorReporting = { enable = true; metadata = { from = "ops@cryto.net"; to = "admin@cryto.net"; }; }; }; networking.firewall.allowedTCPPorts = [ 80 443 ]; environment.systemPackages = with pkgs; [ htop ]; }; }