liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 7fad66ff2779b0b40d150b41c8e99217c1a55948
parent 9994c161d4c9c3aeb54aae38232d9aadbc77af4a
Author: Daniel Barlow <dan@telent.net>
Date:   Sat, 22 Jul 2023 23:50:01 +0100

fix makestep type

Diffstat:
Mmodules/ntp/service.nix | 14+++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)

diff --git 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) ++