lib/network: init

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-01-23 21:31:19 +05:30
committed by natto1784
parent b3fac02b73
commit 950cf357d1
8 changed files with 88 additions and 74 deletions

View File

@@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, network, ... }:
{
networking = {
hostName = "marisa";
@@ -42,16 +42,16 @@
}];
};
};
wireguard.interfaces.wg0 = {
ips = [ "10.55.0.2/24" ];
wireguard.interfaces.wg0 = with network.address.wireguard.ips; {
ips = [ marisa ];
listenPort = 17840;
privateKeyFile = "/var/secrets/wg.key";
peers = [
{
#Oracle VM1
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
allowedIPs = [ "10.55.0.0/24" ];
endpoint = "weirdnatto.in:17840";
allowedIPs = [ remilia ];
endpoint = "${network.addresses.domain.natto}:17840";
persistentKeepalive = 25;
}
];