summary refs log tree commit diff
path: root/nixos/modules/services/networking/hylafax
diff options
context:
space:
mode:
authorYarny0 <41838844+Yarny0@users.noreply.github.com>2021-05-08 21:05:39 +0200
committerYarny0 <41838844+Yarny0@users.noreply.github.com>2021-05-14 05:42:18 +0200
commit89df33f882473f714162ead43288455d6192a35a (patch)
tree8d4a62206ef8d04c17756ed721b22aec93e68675 /nixos/modules/services/networking/hylafax
parent449647daf50c0707e3e5fa6ae9e4c9523fb3dbb3 (diff)
downloadnixpkgs-89df33f882473f714162ead43288455d6192a35a.tar
nixpkgs-89df33f882473f714162ead43288455d6192a35a.tar.gz
nixpkgs-89df33f882473f714162ead43288455d6192a35a.tar.bz2
nixpkgs-89df33f882473f714162ead43288455d6192a35a.tar.lz
nixpkgs-89df33f882473f714162ead43288455d6192a35a.tar.xz
nixpkgs-89df33f882473f714162ead43288455d6192a35a.tar.zst
nixpkgs-89df33f882473f714162ead43288455d6192a35a.zip
nixos/hylafax: replace a nested expression with `lib.pipe`
This avoids a tripple-nested function call,
and it looks slightly simpler (at least to me).
Diffstat (limited to 'nixos/modules/services/networking/hylafax')
-rw-r--r--nixos/modules/services/networking/hylafax/systemd.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/nixos/modules/services/networking/hylafax/systemd.nix b/nixos/modules/services/networking/hylafax/systemd.nix
index f63f7c97ad1..137698ef83d 100644
--- a/nixos/modules/services/networking/hylafax/systemd.nix
+++ b/nixos/modules/services/networking/hylafax/systemd.nix
@@ -13,11 +13,10 @@ let
     # creates hylafax config file,
     # makes sure "Include" is listed *first*
     let
-      mkLines = conf:
-        (lib.concatLists
-        (lib.flip lib.mapAttrsToList conf
-        (k: map (v: "${k}: ${v}")
-      )));
+      mkLines = lib.flip lib.pipe [
+        (lib.mapAttrsToList (key: map (val: "${key}: ${val}")))
+        lib.concatLists
+      ];
       include = mkLines { Include = conf.Include or []; };
       other = mkLines ( conf // { Include = []; } );
     in