wgautomesh variable log level (debug for staging)

This commit is contained in:
Alex 2023-03-17 18:21:50 +01:00
parent 39254cca0e
commit 90efd9155b
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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 = {