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:
parent
b073b546ac
commit
ab94ea66fa
@ -10,7 +10,7 @@ let
|
|||||||
mkListen = kind: addr: let
|
mkListen = kind: addr: let
|
||||||
al_v4 = builtins.match "([0-9.]\+):([0-9]\+)" addr;
|
al_v4 = builtins.match "([0-9.]\+):([0-9]\+)" addr;
|
||||||
al_v6 = builtins.match "\\[(.\+)]:([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)
|
al = findFirst (a: a != null)
|
||||||
(throw "services.kresd.*: incorrect address specification '${addr}'")
|
(throw "services.kresd.*: incorrect address specification '${addr}'")
|
||||||
[ al_v4 al_v6 al_portOnly ];
|
[ al_v4 al_v6 al_portOnly ];
|
||||||
|
Loading…
Reference in New Issue
Block a user