You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.1 KiB
Nix

{
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
];
};
}