From 7fad66ff2779b0b40d150b41c8e99217c1a55948 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sat, 22 Jul 2023 23:50:01 +0100 Subject: [PATCH] fix makestep type --- modules/ntp/service.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/ntp/service.nix b/modules/ntp/service.nix index 6b2b6e49..c8eba9f8 100644 --- a/modules/ntp/service.nix +++ b/modules/ntp/service.nix @@ -20,9 +20,15 @@ let servers = mkOption { type = types.attrsOf serverOpts; default = {}; }; pools = mkOption { type = types.attrsOf serverOpts; default = {}; }; peers = mkOption { type = types.attrsOf serverOpts; default = {}; }; - makestep = { - threshold = mkOption { type = types.number; }; - limit = mkOption { type = types.number; }; + makestep = mkOption { + default = null; + type = types.nullOr + (types.submodule { + options = { + threshold = mkOption { type = types.number; default = null;}; + limit = mkOption { type = types.number; }; + }; + }); }; allow = mkOption { description = "subnets from which NTP clients are allowed to access the server"; @@ -48,6 +54,8 @@ let }; }; configFile = p: + assert (builtins.trace p.makestep true); + (mapAttrsToList (name: opts: "server ${name} ${concatStringsSep "" opts}") p.servers) ++