From 4f471484b3a1e16230979a8406503a220b9101f4 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Tue, 10 Sep 2024 14:51:28 -0500 Subject: I think this is almost working! --- modules/device/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/device/default.nix') diff --git a/modules/device/default.nix b/modules/device/default.nix index a1f80ef..23be585 100644 --- a/modules/device/default.nix +++ b/modules/device/default.nix @@ -4,10 +4,10 @@ let devices = import ../../data/devices.nix; hardware = mkOption { - type = types.strMatching ''^kobo\d+$''; + type = types.strMatching ''^kobo[0-9]+$''; }; deviceID = mkOption { - type = types.strMatching ''00000000-0000-0000-0000-000000000\d\d\d''; + type = types.strMatching ''^00000000-0000-0000-0000-000000000[0-9][0-9][0-9]$''; }; deviceInfo = types.submodule { @@ -41,6 +41,11 @@ in { deviceID = deviceID // { default = config._allDevices.${config.device.name}.deviceID; }; + + serialNumber = mkOption { + type = types.str; + default = "N0"; + }; }; }; } -- cgit v1.2.3