Actually do what the last commit was supposed to do

This commit is contained in:
Charlotte 🦝 Delenk 2022-01-14 21:24:20 +01:00
parent 935a03a56a
commit 1cf456b606
Signed by: darkkirb
GPG key ID: 015E3768A70AFBC5

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }:
let
removeCIDR = cidr: builtins.elemAt (builtins.split "/" cidr) 0;
filterIPs = cidrs: builtins.map "${removeCIDR cidrs}";
filterIPs = cidrs: builtins.map (f: "[${removeCIDR f}]") cidrs;
listenIPs = filterIPs config.networking.wireguard.interfaces."wg0".ips;
in
{