From 7f3124b5300d071c7651edb1e0605bcfd76bfef2 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 1 Jun 2022 01:07:44 +0200 Subject: [PATCH] pkgs: readability --- nix/pkgs/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index 12ba55d..f208b2a 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -71,17 +71,13 @@ let openwrt = import ./openwrt { inherit self nixpkgs system openwrt-imagebuilder; }; - openwrt-images = builtins.foldl' (images: hostName: - let - image = openwrt.buildImage hostName; - in - images // { - "${hostName}-image" = image; - } - ) {} ( + openwrt-images = builtins.foldl' (images: hostName: images // { + "${hostName}-image" = openwrt.buildImage hostName; + }) {} ( builtins.attrNames ( - nixpkgs.lib.filterAttrs (_: { role, ... }: role == "ap") - config.site.hosts + nixpkgs.lib.filterAttrs (_: { role, ... }: + role == "ap" + ) config.site.hosts ) );