diff options
author | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2021-05-08 21:05:39 +0200 |
---|---|---|
committer | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2021-05-14 05:42:18 +0200 |
commit | 89df33f882473f714162ead43288455d6192a35a (patch) | |
tree | 8d4a62206ef8d04c17756ed721b22aec93e68675 /nixos | |
parent | 449647daf50c0707e3e5fa6ae9e4c9523fb3dbb3 (diff) | |
download | nixlib-89df33f882473f714162ead43288455d6192a35a.tar nixlib-89df33f882473f714162ead43288455d6192a35a.tar.gz nixlib-89df33f882473f714162ead43288455d6192a35a.tar.bz2 nixlib-89df33f882473f714162ead43288455d6192a35a.tar.lz nixlib-89df33f882473f714162ead43288455d6192a35a.tar.xz nixlib-89df33f882473f714162ead43288455d6192a35a.tar.zst nixlib-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')
-rw-r--r-- | nixos/modules/services/networking/hylafax/systemd.nix | 9 |
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 f63f7c97ad1c..137698ef83db 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 |