From 21f2320d86f6b23fdddd46c7cc2f02f58f287af4 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 20 Aug 2024 23:26:11 +0100 Subject: [PATCH] inline method --- modules/hostapd/service.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/hostapd/service.nix b/modules/hostapd/service.nix index 64eb958..d4edb2e 100644 --- a/modules/hostapd/service.nix +++ b/modules/hostapd/service.nix @@ -32,14 +32,13 @@ let int = builtins.toJSON; set = (o: "output(${builtins.toJSON o.service}, ${builtins.toJSON o.path})"); }.${builtins.typeOf o}) o; - format_value = n : v: - "${n}={{ ${literal_or_output v} }}"; + conf = (writeText "hostapd.conf.in" ((concatStringsSep "\n" (mapAttrsToList - format_value + (n : v : "${n}={{ ${literal_or_output v} }}") attrs)) + "\n")); service = longrun { inherit name;