|
|
@ -9,6 +9,7 @@ let |
|
|
|
unpack = self.callPackage ./lib/unpack.nix {}; |
|
|
|
mobileProxy = self.callPackage ./packages/mobile-proxy { configFile = null; }; |
|
|
|
matrixRooms = self.callPackage ./packages/matrix-rooms {}; |
|
|
|
pastebinStream = self.callPackage ./packages/pastebin-stream { errorPath = null; }; |
|
|
|
}; |
|
|
|
}) |
|
|
|
]; |
|
|
@ -30,6 +31,7 @@ let |
|
|
|
httpHealthChecks = (import ./lib/http-health-checks.nix); |
|
|
|
nginx = (import ./lib/nginx.nix); |
|
|
|
daemon = (import ./lib/daemon.nix); |
|
|
|
errorReporter = (import ./lib/error-reporter.nix); |
|
|
|
in { |
|
|
|
network = { |
|
|
|
inherit pkgs; |
|
|
@ -207,6 +209,7 @@ in { |
|
|
|
}) |
|
|
|
]; |
|
|
|
|
|
|
|
# FIXME: Verify that this actually works... |
|
|
|
services.borgbackup.jobs.system = { |
|
|
|
paths = "/"; |
|
|
|
exclude = [ |
|
|
@ -391,6 +394,47 @@ in { |
|
|
|
]; |
|
|
|
}; |
|
|
|
|
|
|
|
"machine-osmium-01.cryto.net" = let |
|
|
|
self = nodes."machine-osmium-01.cryto.net"; |
|
|
|
pastebinStreamPackage = pkgs.cryto.pastebinStream.override { errorPath = "/var/lib/pastebin-stream/errors"; }; |
|
|
|
in { pkgs, lib, config, ... }@args: { |
|
|
|
system.stateVersion = "16.09"; |
|
|
|
networking.hostName = "machine-osmium-01"; |
|
|
|
|
|
|
|
imports = [ |
|
|
|
presets.base |
|
|
|
./hardware-configurations/machine-osmium-01.nix |
|
|
|
(tincConfiguration { hostname = self.hostname; nodes = nodes; }) |
|
|
|
(trackSystemMetrics self.internalIpv4) |
|
|
|
(trackServiceMetrics self.internalIpv4) |
|
|
|
(httpHealthChecks { |
|
|
|
both = [ |
|
|
|
"pastebin-stream.cryto.net" |
|
|
|
]; |
|
|
|
}) |
|
|
|
(daemon { |
|
|
|
name = "pastebin-stream"; |
|
|
|
displayName = "pastebin-stream"; |
|
|
|
fakeHome = false; |
|
|
|
binaryPath = "${pastebinStreamPackage}/bin/pastebin-stream"; |
|
|
|
environmentVariables = {}; |
|
|
|
}) |
|
|
|
(errorReporter { |
|
|
|
serviceName = "pastebin-stream"; |
|
|
|
binaryPath = "${pastebinStreamPackage}/node_modules/.bin/report-errors"; |
|
|
|
errorPath = "/var/lib/pastebin-stream/errors"; |
|
|
|
from = "ops@cryto.net"; |
|
|
|
to = "admin@cryto.net"; |
|
|
|
}) |
|
|
|
(nginx { |
|
|
|
"pastebin-stream.cryto.net" = [ |
|
|
|
(nginxPresets.letsEncrypt) |
|
|
|
(nginxPresets.reverseProxy "http://localhost:3000/") |
|
|
|
]; |
|
|
|
}) |
|
|
|
]; |
|
|
|
}; |
|
|
|
|
|
|
|
"machine-workbot-01.cryto.net" = let |
|
|
|
self = nodes."machine-workbot-01.cryto.net"; |
|
|
|
in { pkgs, lib, config, ... }@args: { |
|
|
|