From 6e4df43f623ee0661c3f3747f7260981c6fc23f7 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 21 Feb 2020 15:35:51 +0000 Subject: feat(ops/nixos/camden): Forward logs to Stackdriver Logging Enables the journaldriver service to forward logs into a "home" log-stream in the "tazjins-infrastructure" project. The service account key for camden has been placed on the machine manually. --- ops/nixos/camden/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ops/nixos/camden') diff --git a/ops/nixos/camden/default.nix b/ops/nixos/camden/default.nix index e60385e8fe08..0f1fb1666bd0 100644 --- a/ops/nixos/camden/default.nix +++ b/ops/nixos/camden/default.nix @@ -170,6 +170,14 @@ in lib.fix(self: { postRun = "systemctl reload nginx"; }; + # Forward logs to Google Cloud Platform + services.journaldriver = { + enable = true; + logStream = "home"; + googleCloudProject = "tazjins-infrastructure"; + applicationCredentials = "/etc/gcp/key.json"; + }; + # serve my website services.nginx = { enable = true; -- cgit 1.4.1