Add and fix wireguard on hummelberg

This commit is contained in:
Fabian Hauser 2020-11-30 21:34:40 +01:00
parent f4c6c70d67
commit 2a34c9d427
2 changed files with 12 additions and 1 deletions

View file

@ -12,4 +12,15 @@
# Configure network proxy if necessary # Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
networking.wireguard.enable = true;
networking.wireguard.interfaces = let
meta = import ../../meta;
vnetworks = meta.network.virtual;
vnetworkName = "mgmt";
in {
"wg-${vnetworkName}" =
pkgs.lib.qois.wireguard.makeInterface config.networking.hostName
vnetworkName vnetworks.${vnetworkName};
};
} }

View file

@ -9,7 +9,7 @@
endpoint = hostconf.endpoint; endpoint = hostconf.endpoint;
allowedIPs = [ hostconf.v4.ip ]; allowedIPs = [ hostconf.v4.ip ];
persistantKeepalive = hostconf.persistentKeepalive; persistentKeepalive = hostconf.persistentKeepalive;
}); });
makeInterface = (hostName: netname: netconfig: { makeInterface = (hostName: netname: netconfig: {