1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: add new host envoy for mail, switch disko to partlabel

This commit is contained in:
oddlama 2024-04-07 21:59:54 +02:00
parent 303fbd5595
commit 289fcdd197
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
45 changed files with 302 additions and 154 deletions

38
hosts/envoy/net.nix Normal file
View file

@ -0,0 +1,38 @@
{config, ...}: {
networking.hostId = config.repo.secrets.local.networking.hostId;
networking.domain = config.repo.secrets.global.domains.me;
boot.initrd.systemd.network = {
enable = true;
networks = {inherit (config.systemd.network.networks) "10-wan";};
};
systemd.network.networks = {
"10-wan" = let
icfg = config.repo.secrets.local.networking.interfaces.wan;
in {
address = [
icfg.hostCidrv4
icfg.hostCidrv6
];
gateway = ["fe80::1"];
routes = [
{routeConfig = {Destination = "172.31.1.1";};}
{
routeConfig = {
Gateway = "172.31.1.1";
GatewayOnLink = true;
};
}
];
matchConfig.MACAddress = icfg.mac;
networkConfig.IPv6PrivacyExtensions = "yes";
linkConfig.RequiredForOnline = "routable";
};
};
networking.nftables.firewall.zones.untrusted.interfaces = ["wan"];
# Allow accessing influx
wireguard.proxy-sentinel.client.via = "sentinel";
}