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.

45 lines
981 B
Nix

8 years ago
{
network.description = "Cryto";
7 years ago
osmium = { config, lib, pkgs, ... }@args: let
8 years ago
proxiedApplications = [{
hostname = "pastebin-stream.cryto.net";
tls = false;
root = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
8 years ago
config = ''
8 years ago
'';
}];
generateCaddyHostConfiguration = applications:
lib.concatStrings (map (application: ''
${application.hostname} {
${lib.optionalString (application.tls == false) "tls off"}
${lib.optionalString (application.root != null) "root ${application.root}"}
8 years ago
${application.config}
}
'') applications);
pastebinStream = (import ../applications/pastebin-stream.nix);
8 years ago
in {
imports = [
(pastebinStream args)
];
8 years ago
services.caddy = {
enable = true;
agree = true;
email = "admin@cryto.net";
config = ''
${generateCaddyHostConfiguration proxiedApplications}
'';
};
networking.firewall.allowedTCPPorts = [ 2015 ];
environment.systemPackages = with pkgs; [
htop
];
8 years ago
};
}