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.

69 lines
1.5 KiB
Nix

7 years ago
{
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 = "06ef0fa19aa05a755efcafd9be077d3dacd79ee8";
sha256 = "06ilz7g31lrwyn1lcx095a5nn305xfmg5whdqb4ghgc8whn765s8";
})
];
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";
};
};
};
7 years ago
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;
};
};
};
};
7 years ago
}