From 90efd9155b4e2014b75133ff123893fb0478c025 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 17 Mar 2023 18:21:50 +0100 Subject: wgautomesh variable log level (debug for staging) --- cluster/staging/cluster.nix | 1 + nix/wgautomesh.nix | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cluster/staging/cluster.nix b/cluster/staging/cluster.nix index 8629f3a..cf30d6e 100644 --- a/cluster/staging/cluster.nix +++ b/cluster/staging/cluster.nix @@ -44,6 +44,7 @@ endpoint = "bitfrost.fiber.shirokumo.net:33734"; } ]; + services.wgautomesh.logLevel = "debug"; # Bootstrap IPs for Consul cluster, # these are IPs on the Wireguard overlay diff --git a/nix/wgautomesh.nix b/nix/wgautomesh.nix index e46ad75..5a1480c 100644 --- a/nix/wgautomesh.nix +++ b/nix/wgautomesh.nix @@ -14,6 +14,11 @@ in { options.services.wgautomesh = { enable = mkEnableOption "wgautomesh"; + logLevel = mkOption { + type = types.str; + default = "info"; + description = "wgautomesh log level (trace/debug/info/warn/error)"; + }; interface = mkOption { type = types.str; description = "Wireguard interface to manage"; @@ -97,7 +102,7 @@ in enable = true; path = [ pkgs.wireguard-tools ]; environment = { - RUST_LOG = "wgautomesh=info"; + RUST_LOG = "wgautomesh=${cfg.logLevel}"; }; description = "wgautomesh"; serviceConfig = { -- cgit v1.2.3