feat: dns for vlans
This commit is contained in:
parent
5d1bc8cf67
commit
9347751df7
|
@ -1,4 +1,9 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
globals,
|
||||
...
|
||||
}:
|
||||
{
|
||||
wireguard.services = {
|
||||
client.via = "nucnix";
|
||||
|
@ -30,11 +35,9 @@
|
|||
];
|
||||
};
|
||||
user_rules = [
|
||||
# "||adguardhome.${config.secrets.secrets.global.domains.web}^$dnsrewrite=${lib.net.cidr.host config.secrets.secrets.global.net.ips.elisabeth config.secrets.secrets.global.net.privateSubnetv4}"
|
||||
# "||nc.${config.secrets.secrets.global.domains.web}^$dnsrewrite=${lib.net.cidr.host config.secrets.secrets.global.net.ips.elisabeth config.secrets.secrets.global.net.privateSubnetv4}"
|
||||
# "||immich.${config.secrets.secrets.global.domains.web}^$dnsrewrite=${lib.net.cidr.host config.secrets.secrets.global.net.ips.elisabeth config.secrets.secrets.global.net.privateSubnetv4}"
|
||||
# "||smb.${config.secrets.secrets.global.domains.web}^$dnsrewrite=${lib.net.cidr.host config.secrets.secrets.global.net.ips.elisabeth-samba config.secrets.secrets.global.net.privateSubnetv4}"
|
||||
# "||fritz.box^$dnsrewrite=${lib.net.cidr.host 1 config.secrets.secrets.global.net.privateSubnetv4}"
|
||||
"||${globals.domains.web}^$dnsrewrite=${lib.net.cidr.host globals.services.nginx.ip globals.net.vlans.home.cidrv4}"
|
||||
"||${globals.services.samba.domain}^$dnsrewrite=${lib.net.cidr.host globals.services.samba.ip globals.net.vlans.home.cidrv4}"
|
||||
"||fritz.box^$dnsrewrite=${lib.net.cidr.host 1 "10.99.2.0/24"}"
|
||||
];
|
||||
dhcp.enabled = false;
|
||||
ratelimit = 60;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{
|
||||
lib,
|
||||
utils,
|
||||
globals,
|
||||
...
|
||||
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
|
@ -55,30 +57,17 @@ in
|
|||
}
|
||||
{
|
||||
name = "domain-name-servers";
|
||||
data = "${net.cidr.host 10 subnet}";
|
||||
data = "${net.cidr.host globals.services.adguardhome.ip subnet}";
|
||||
}
|
||||
];
|
||||
reservations = [
|
||||
#FIXME
|
||||
# {
|
||||
# hw-address = nodes.ward-adguardhome.config.lib.microvm.mac;
|
||||
# ip-address = globals.net.home-lan.hosts.ward-adguardhome.ipv4;
|
||||
# }
|
||||
# {
|
||||
# hw-address = nodes.ward-web-proxy.config.lib.microvm.mac;
|
||||
# ip-address = globals.net.home-lan.hosts.ward-web-proxy.ipv4;
|
||||
# }
|
||||
# {
|
||||
# hw-address = nodes.sire-samba.config.lib.microvm.mac;
|
||||
# ip-address = globals.net.home-lan.hosts.sire-samba.ipv4;
|
||||
# }
|
||||
];
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.kea-dhcp4-server.after = [
|
||||
"sys-subsystem-net-devices-${utils.escapeSystemdPath "lan-self"}.device"
|
||||
];
|
||||
systemd.services.kea-dhcp4-server.after = flip mapAttrsToList vlans (
|
||||
name: _: "sys-subsystem-net-devices-${utils.escapeSystemdPath "lan-${name}"}.device"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue