From b31cf42d2dc7cc4cfb8bf859b6583a294f4caae3 Mon Sep 17 00:00:00 2001 From: Brian McGee Date: Mon, 31 Mar 2025 10:50:57 +0100 Subject: [PATCH] fix(docs): tighten up validation for meta.name and improved description --- lib/inventory/build-inventory/meta-interface.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/inventory/build-inventory/meta-interface.nix b/lib/inventory/build-inventory/meta-interface.nix index d062f72d0..558201234 100644 --- a/lib/inventory/build-inventory/meta-interface.nix +++ b/lib/inventory/build-inventory/meta-interface.nix @@ -4,11 +4,14 @@ let metaOptions = { name = lib.mkOption { - type = types.str; + type = types.strMatching "[a-zA-Z0-9_-]*"; + example = "my_clan"; description = '' Name of the clan. Needs to be (globally) unique, as this determines the folder name where the flake gets downloaded to. + + Should only contain alphanumeric characters, `_` and `-`. ''; }; description = lib.mkOption {