Skip to content

Commit

Permalink
machines/resolver[1-2].ff.tomhe.de: init mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
herbetom committed Nov 28, 2024
1 parent 052248a commit 986d84f
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 0 deletions.
1 change: 1 addition & 0 deletions machines/resolver1.ff.tomhe.de/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../roles/all.nix
./resolver.nix
];

boot.kernelParams = [ "console=ttyS0,115200n8" ];
Expand Down
33 changes: 33 additions & 0 deletions machines/resolver1.ff.tomhe.de/resolver.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
{
imports = [
../../modules/freifunk
../../roles/resolver
];

modules.freifunk.gateway = {
vxlan.local = "2a01:4f8:171:3242:5054:ff:fefa:a211";
domains = {
dom0 = {
batmanAdvanced.mac = "47:8a:5a:96:18:4e";
ipv4 = {
prefixes."10.1.64.0/20" = {};
};
ipv6 = {
prefixes = {
"fdeb:52c8:d094:1000::/64" = {
addresses =[
"fdeb:52c8:d094:1000::53:1"
];
};
"2a01:4f8:160:97c0::/64" = {
addresses =[
"2a01:4f8:160:97c0::53:1"
];
};
};
};
};
};
};
}
1 change: 1 addition & 0 deletions machines/resolver2.ff.tomhe.de/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../roles/all.nix
./resolver.nix
];

boot.kernelParams = [ "console=ttyS0,115200n8" ];
Expand Down
33 changes: 33 additions & 0 deletions machines/resolver2.ff.tomhe.de/resolver.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
{
imports = [
../../modules/freifunk
../../roles/resolver
];

modules.freifunk.gateway = {
vxlan.local = "2a01:4f8:140:4093:5054:ff:fe2c:c94b";
domains = {
dom0 = {
batmanAdvanced.mac = "b6:38:a8:1d:8c:b3";
ipv4 = {
prefixes."10.1.64.0/20" = {};
};
ipv6 = {
prefixes = {
"fdeb:52c8:d094:1000::/64" = {
addresses =[
"fdeb:52c8:d094:1000::53:2"
];
};
"2a01:4f8:160:97c0::/64" = {
addresses =[
"2a01:4f8:160:97c0::53:2"
];
};
};
};
};
};
};
}
56 changes: 56 additions & 0 deletions roles/resolver/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{ config, lib, pkgs, ... }:
{
imports = [
../../modules/freifunk
];

modules.freifunk.gateway = {
enable = true;
yanic.enable = false;
dnsSearchDomain = [
"ff.tomhe.de"
];
domains = {
dom0 = {
fastd.enable = false;
names = {
dom0 = "Domain 0";
ffda_default = "Default";
};
bird.enable = false;
vxlan.vni = 97726;
ipv4 = {
# subnet = "10.1.64.0/20";
prefixes."10.1.64.0/20" = {};

# address = "10.1.64.1";
dhcpV4 = {
enable = lib.mkDefault false;
dnsServers = [ "10.1.67.254" ];
# pools = [
# "10.1.64.8 - 10.1.64.255"
# "10.1.65.8 - 10.84.3.255"
# ];
};
};
ipv6 = {
dnsServers = [
"fdeb:52c8:d094:1000::1:1"
];
};
};
};
};

environment.systemPackages = with pkgs; [
bridge-utils
git
fastd
jq
batctl
tcpdump
];

systemd.network.networks."10-mainif".networkConfig.VXLAN = config.modules.freifunk.gateway.vxlan.interfaceNames;

}

0 comments on commit 986d84f

Please sign in to comment.