nixos/kresd: Fix unsupported regex

Regex supported by `builtins.match` differ on Linux and Darwin
(see NixOS/Nix#1537) and the empty match group errors on Darwin.
But simply removing it does not change the logic in the module in any
way.
This commit is contained in:
Brian Olsen 2020-10-15 14:37:04 +02:00
parent b073b546ac
commit ab94ea66fa
No known key found for this signature in database
GPG Key ID: 029DD8E8B95882E8

View File

@ -10,7 +10,7 @@ let
mkListen = kind: addr: let
al_v4 = builtins.match "([0-9.]\+):([0-9]\+)" addr;
al_v6 = builtins.match "\\[(.\+)]:([0-9]\+)" addr;
al_portOnly = builtins.match "()([0-9]\+)" addr;
al_portOnly = builtins.match "([0-9]\+)" addr;
al = findFirst (a: a != null)
(throw "services.kresd.*: incorrect address specification '${addr}'")
[ al_v4 al_v6 al_portOnly ];