From 0bd211d84f66975380c35386b7b19a69d1beff44 Mon Sep 17 00:00:00 2001 From: Daniel Ehlers Date: Mon, 6 Mar 2017 16:41:02 +0100 Subject: [PATCH] ddclient: Make verbose logging deactivatable. --- .../modules/services/networking/ddclient.nix | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/ddclient.nix b/nixos/modules/services/networking/ddclient.nix index 5928203368d2..28c96a9baefc 100644 --- a/nixos/modules/services/networking/ddclient.nix +++ b/nixos/modules/services/networking/ddclient.nix @@ -7,7 +7,7 @@ let stateDir = "/var/spool/ddclient"; ddclientUser = "ddclient"; - ddclientFlags = "-foreground -verbose -noquiet -file ${config.services.ddclient.configFile}"; + ddclientFlags = "-foreground -file ${config.services.ddclient.configFile}"; ddclientPIDFile = "${stateDir}/ddclient.pid"; in @@ -102,6 +102,22 @@ in Method to determine the IP address to send to the dynamic DNS provider. ''; }; + + verbose = mkOption { + default = true; + type = bool; + description = '' + Print verbose information. + ''; + }; + + quiet = mkOption { + default = false; + type = bool; + description = '' + Print no messages for unnecessary updates. + ''; + }; }; }; @@ -136,6 +152,8 @@ in lib.optionalString (server != "") "server=${server}"} ssl=${if config.services.ddclient.ssl then "yes" else "no"} wildcard=YES + quiet=${if config.services.ddclient.quiet then "yes" else "no"} + verbose=${if config.services.ddclient.verbose then "yes" else "no"} ${config.services.ddclient.domain} ${config.services.ddclient.extraConfig} '';