aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-03-17 18:21:50 +0100
committerAlex Auvolat <alex@adnab.me>2023-03-17 18:21:50 +0100
commit90efd9155b4e2014b75133ff123893fb0478c025 (patch)
treee012c32f12544351f21091541614364327bd817e
parent39254cca0ea74ca7c84c3de3f85102dbf4d39f44 (diff)
downloadnixcfg-90efd9155b4e2014b75133ff123893fb0478c025.tar.gz
nixcfg-90efd9155b4e2014b75133ff123893fb0478c025.zip
wgautomesh variable log level (debug for staging)
-rw-r--r--cluster/staging/cluster.nix1
-rw-r--r--nix/wgautomesh.nix7
2 files changed, 7 insertions, 1 deletions
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 = {