From 25c0c05a5a3e9d0e3e91231f3e909abdf319d547 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 23 Apr 2020 18:44:40 +0200 Subject: [PATCH] freifunk: DRY --- hosts/containers/freifunk/configuration.nix | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/hosts/containers/freifunk/configuration.nix b/hosts/containers/freifunk/configuration.nix index bfa7ed8f..c64cc9e0 100644 --- a/hosts/containers/freifunk/configuration.nix +++ b/hosts/containers/freifunk/configuration.nix @@ -104,17 +104,12 @@ in { "2a02:8106:208:5281:8000::1/64" "fd23:42:c3d2:581:8000::1/64" ]; - routes = [ { - routeConfig = { - # upstream1 - Gateway = "2a02:8106:208:5281::b:0"; - }; - } { - routeConfig = { - # anon1 - Gateway = "172.20.72.7"; - }; - } ]; + routes = map (Gateway: { routeConfig = { inherit Gateway; }; }) [ + # upstream1 + "2a02:8106:208:5281::b:0" + # anon1 + "172.20.72.7" + ]; }; }; };