From d6d04422433dc031be0f6271fc594d68f4b01405 Mon Sep 17 00:00:00 2001 From: Ricardo Ardissone Date: Sun, 3 May 2020 22:39:14 -0300 Subject: [PATCH] nixos/hostapd: add logLevel option --- nixos/modules/services/networking/hostapd.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix index f2434be24621..c11f5bab3d5c 100644 --- a/nixos/modules/services/networking/hostapd.nix +++ b/nixos/modules/services/networking/hostapd.nix @@ -24,9 +24,9 @@ let # logging (debug level) logger_syslog=-1 - logger_syslog_level=2 + logger_syslog_level=${toString cfg.logLevel} logger_stdout=-1 - logger_stdout_level=2 + logger_stdout_level=${toString cfg.logLevel} ctrl_interface=/run/hostapd ctrl_interface_group=${cfg.group} @@ -145,6 +145,19 @@ in ''; }; + logLevel = mkOption { + default = 2; + type = types.int; + description = '' + Levels (minimum value for logged events): + 0 = verbose debugging + 1 = debugging + 2 = informational messages + 3 = notification + 4 = warning + ''; + }; + countryCode = mkOption { default = null; example = "US";