refactor: Module to ugaif and readme update
This commit is contained in:
committed by
Hunter Halloran
parent
c46b0aa685
commit
205f03337a
@@ -13,15 +13,16 @@ let
|
||||
# varName: the shell variable to assign
|
||||
# prefix: optional string to prepend to the value (default: "")
|
||||
# attrset: attribute set to use (default: hostmap)
|
||||
macCaseBuilder = {
|
||||
varName,
|
||||
prefix ? "",
|
||||
attrset ? hostmap
|
||||
}:
|
||||
macCaseBuilder =
|
||||
{
|
||||
varName,
|
||||
prefix ? "",
|
||||
attrset ? hostmap,
|
||||
}:
|
||||
lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (mac: val: " ${mac}) ${varName}=${prefix}${val} ;;") attrset
|
||||
);
|
||||
in
|
||||
in
|
||||
{
|
||||
inherit hostmap macCaseBuilder;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user