mirror of
https://github.com/dali99/nixos-matrix-modules.git
synced 2025-06-19 04:53:33 +02:00
lib: fix bug where lib.throw
does not exist
This commit is contained in:
2
lib.nix
2
lib.nix
@ -4,7 +4,7 @@ rec {
|
|||||||
isListenerType = type: l: lib.any (r: lib.any (n: n == type) r.names) l.resources;
|
isListenerType = type: l: lib.any (r: lib.any (n: n == type) r.names) l.resources;
|
||||||
# Get the first listener that includes the given resource from worker
|
# Get the first listener that includes the given resource from worker
|
||||||
firstListenerOfType = type: ls: lib.lists.findFirst (isListenerType type)
|
firstListenerOfType = type: ls: lib.lists.findFirst (isListenerType type)
|
||||||
(lib.throw "No listener with resource: ${type} configured")
|
(throw "No listener with resource: ${type} configured")
|
||||||
ls;
|
ls;
|
||||||
# Get an attrset of the host and port from a listener
|
# Get an attrset of the host and port from a listener
|
||||||
connectionInfo = l: {
|
connectionInfo = l: {
|
||||||
|
Reference in New Issue
Block a user