From 614ddbb241e54aafd0f5dc7b05d7cec2363d2710 Mon Sep 17 00:00:00 2001 From: Ethel Morgan Date: Tue, 7 Jul 2020 23:43:56 +0100 Subject: use types.nullOr for dispatch.rules --- nixos/modules/services/dispatch.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/dispatch.nix b/nixos/modules/services/dispatch.nix index c5f8005..168e456 100644 --- a/nixos/modules/services/dispatch.nix +++ b/nixos/modules/services/dispatch.nix @@ -36,33 +36,32 @@ in { example = "/gitolite-repo-updated"; }; formValues = mkOption { - type = types.attrsOf types.str; + type = types.nullOr (types.attrsOf types.str); example = { repo = "catbus-web-ui"; }; - default = {}; + default = null; }; }; }); - default = []; }; actions = mkOption { - type = types.listOf (types.submodule { + type = types.nullOr (types.listOf (types.submodule { options = { url = mkOption { type = types.str; example = "https://build.eth.moe/deploy"; }; formValues = mkOption { - type = types.attrsOf types.str; + type = types.nullOr (types.attrsOf types.str); example = { project = "catbus-web-ui"; }; - default = {}; + default = null; }; }; - }); - default = []; + })); + default = null; }; }; }); -- cgit v1.2.3