fix(kasen): networking config

This commit is contained in:
arcnmx 2024-05-10 16:24:44 -07:00
parent 06471a7b34
commit 6cfaf82535
6 changed files with 55 additions and 7 deletions

View file

@ -104,7 +104,11 @@
"hostName": "kasen", "hostName": "kasen",
"networks": { "networks": {
"int": null, "int": null,
"local": null, "local": {
"address4": "10.1.1.49",
"address6": "fd0a::ba27:ebff:fe7e:e241",
"macAddress": "b8:27:eb:7e:e2:41"
},
"tail": null "tail": null
} }
} }

View file

@ -30,6 +30,7 @@ reimu:: `10.1.1.45`
idp:: `10.1.1.46` idp:: `10.1.1.46`
aya:: `10.1.1.47` aya:: `10.1.1.47`
keycloak:: `10.1.1.48` keycloak:: `10.1.1.48`
kasen:: `10.1.1.49`
nue:: `10.1.1.62` nue:: `10.1.1.62`
koishi:: `10.1.1.63` koishi:: `10.1.1.63`

View file

@ -34,7 +34,7 @@ in {
inherit (proxmox.network) internal local; inherit (proxmox.network) internal local;
conditions = coalesce [ conditions = coalesce [
(mapNullable (interface: [ "iifname ${interface.name}" ]) internal.interface) (mapNullable (interface: [ "iifname ${interface.name}" ]) internal.interface)
(mapNullable (interface: config.networking.interfaces.local.nftables.conditions) local.interface) (mapNullable (interface: config.networking.firewall.interfaces.local.nftables.conditions) local.interface)
]; ];
in mkIf (conditions != null) { in mkIf (conditions != null) {
nftables = { nftables = {

View file

@ -1,7 +1,6 @@
_: { _: {
imports = [ imports = [
]; ];
deploy.hostname = "10.1.1.139";
# TODO: get an aarch64-linux builder on aya! # TODO: get an aarch64-linux builder on aya!
ci.enable = false; ci.enable = false;
arch = "aarch64"; arch = "aarch64";
@ -15,4 +14,10 @@ _: {
sshd.enable = true; sshd.enable = true;
}; };
}; };
network.networks = {
local = {
macAddress = "b8:27:eb:7e:e2:41";
address4 = "10.1.1.49";
};
};
} }

View file

@ -19,8 +19,6 @@ in {
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true; boot.loader.generic-extlinux-compatible.enable = true;
networking.interfaces.enu1u1.useDHCP = true;
hardware.rtl-sdr.enable = true; hardware.rtl-sdr.enable = true;
services.openwebrx = { services.openwebrx = {
@ -42,7 +40,7 @@ in {
}; };
users.groups.openwebrx = {}; users.groups.openwebrx = {};
networking.firewall.allowedTCPPorts = [ networking.firewall.interfaces.local.allowedTCPPorts = [
8073 8073
]; ];
@ -53,5 +51,35 @@ in {
fsType = "ext4"; fsType = "ext4";
}; };
networking.useNetworkd = true;
systemd.network = {
networks."40-enu1u1" = {
inherit (config.systemd.network.links.enu1u1) matchConfig;
address = ["10.1.1.49/24"];
gateway = ["10.1.1.1"];
DHCP = "no";
networkConfig = {
IPv6AcceptRA = true;
};
linkConfig = {
Multicast = true;
};
};
links.enu1u1 = {
matchConfig = {
Type = "ether";
MACAddress = "b8:27:eb:7e:e2:41";
};
linkConfig = {
WakeOnLan = "magic";
};
};
};
networking.firewall.interfaces.lan = {
nftables = {
conditions = config.networking.firewall.interfaces.local.nftables.conditions;
};
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View file

@ -95,6 +95,16 @@ module "mediabox_system_records" {
] ]
} }
module "kasen_system_records" {
source = "./system/records"
zone_id = cloudflare_zone.gensokyo-zone_zone.id
zone_zone = cloudflare_zone.gensokyo-zone_zone.zone
net_data = local.systems.kasen.network
local_subdomains = [
"rtlsdr",
]
}
module "litterbox_system_records" { module "litterbox_system_records" {
source = "./system/records" source = "./system/records"
zone_id = cloudflare_zone.gensokyo-zone_zone.id zone_id = cloudflare_zone.gensokyo-zone_zone.id