inline method

This commit is contained in:
Daniel Barlow 2024-08-20 23:26:11 +01:00
parent d40ada4251
commit 21f2320d86
1 changed files with 2 additions and 3 deletions

View File

@ -32,14 +32,13 @@ let
int = builtins.toJSON; int = builtins.toJSON;
set = (o: "output(${builtins.toJSON o.service}, ${builtins.toJSON o.path})"); set = (o: "output(${builtins.toJSON o.service}, ${builtins.toJSON o.path})");
}.${builtins.typeOf o}) o; }.${builtins.typeOf o}) o;
format_value = n : v:
"${n}={{ ${literal_or_output v} }}";
conf = conf =
(writeText "hostapd.conf.in" (writeText "hostapd.conf.in"
((concatStringsSep ((concatStringsSep
"\n" "\n"
(mapAttrsToList (mapAttrsToList
format_value (n : v : "${n}={{ ${literal_or_output v} }}")
attrs)) + "\n")); attrs)) + "\n"));
service = longrun { service = longrun {
inherit name; inherit name;