{ 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 = config.systems.osmium.applications.pastebin-stream.hostname; tls = true; proxyTarget = "http://localhost:3000"; }]; in { imports = [ (pastebinStream { errorPath = "/var/lib/pastebin-stream/errors"; rev = "bed9fefc9cc5dcf2c8aaf32c20e48e5eb70b0920"; sha256 = "0glj8hmx820afv1bqdjmyff1gvr20p40nl4ksh6200pnbncsbxyh"; }) ]; config = { 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 ]; }; options.systems.osmium = with lib; { applications.pastebin-stream = { hostname = mkOption { description = '' The hostname to expose the pastebin-stream application on. ''; type = types.str; }; }; }; }; }