From 4231a21c6047381d79882934b314ae5388b44e47 Mon Sep 17 00:00:00 2001 From: MakiseKurisu Date: Thu, 25 Jul 2024 19:05:44 +0800 Subject: [PATCH] fix: config name can include hyphens (https-dns-proxy) --- openwrt/uci.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openwrt/uci.nix b/openwrt/uci.nix index 92cd995..7cdccea 100644 --- a/openwrt/uci.nix +++ b/openwrt/uci.nix @@ -61,7 +61,12 @@ let uciIdentifierCheck = type: attrs: let invalid = lib.filter - (n: builtins.match "[a-zA-Z0-9_]+" n == null) + (n: builtins.match ( + if type == "config" then + "[a-zA-Z0-9_-]+" + else + "[a-zA-Z0-9_]+" + ) n == null) (lib.attrNames attrs); in lib.warnIf