shinobu/router: Add avahi reflector
This commit is contained in:
parent
f0a5cef516
commit
c6a6a8a322
15
machines/shinobu/services/router/avahi.nix
Normal file
15
machines/shinobu/services/router/avahi.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = pkgs.callPackage ./common.nix { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
reflector = true;
|
||||||
|
allowInterfaces = lib.mapAttrsToList (name: _: "br-${name}") (lib.filterAttrs (_: { avahi, ... }: avahi) cfg.vlan);
|
||||||
|
};
|
||||||
|
}
|
|
@ -60,26 +60,31 @@ rec {
|
||||||
id = 10;
|
id = 10;
|
||||||
subnet = mkSubnet "10.80.1.0/24" "2001:470:73b9:1::/64";
|
subnet = mkSubnet "10.80.1.0/24" "2001:470:73b9:1::/64";
|
||||||
domain = "lan.shinonome-lab.de";
|
domain = "lan.shinonome-lab.de";
|
||||||
|
avahi = true;
|
||||||
};
|
};
|
||||||
management = {
|
management = {
|
||||||
id = 20;
|
id = 20;
|
||||||
subnet = mkSubnet "10.80.2.0/24" "2001:470:73b9:2::/64";
|
subnet = mkSubnet "10.80.2.0/24" "2001:470:73b9:2::/64";
|
||||||
domain = "management.shinonome-lab.de";
|
domain = "management.shinonome-lab.de";
|
||||||
|
avahi = false;
|
||||||
};
|
};
|
||||||
guest = {
|
guest = {
|
||||||
id = 30;
|
id = 30;
|
||||||
subnet = mkSubnet "10.80.3.0/24" "2001:470:73b9:3::/64";
|
subnet = mkSubnet "10.80.3.0/24" "2001:470:73b9:3::/64";
|
||||||
domain = "guest.shinonome-lab.de";
|
domain = "guest.shinonome-lab.de";
|
||||||
|
avahi = false;
|
||||||
};
|
};
|
||||||
iot = {
|
iot = {
|
||||||
id = 40;
|
id = 40;
|
||||||
subnet = mkSubnet "10.80.4.0/24" "2001:470:73b9:4::/64";
|
subnet = mkSubnet "10.80.4.0/24" "2001:470:73b9:4::/64";
|
||||||
domain = "iot.shinonome-lab.de";
|
domain = "iot.shinonome-lab.de";
|
||||||
|
avahi = true;
|
||||||
};
|
};
|
||||||
printer = {
|
printer = {
|
||||||
id = 41;
|
id = 41;
|
||||||
subnet = mkSubnet "10.80.5.0/24" "2001:470:73b9:5::/64";
|
subnet = mkSubnet "10.80.5.0/24" "2001:470:73b9:5::/64";
|
||||||
domain = "printer.shinonome-lab.de";
|
domain = "printer.shinonome-lab.de";
|
||||||
|
avahi = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
tc = {
|
tc = {
|
||||||
|
|
|
@ -31,6 +31,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./avahi.nix
|
||||||
./dnsmasq.nix
|
./dnsmasq.nix
|
||||||
./nft.nix
|
./nft.nix
|
||||||
./tc.nix
|
./tc.nix
|
||||||
|
|
Loading…
Reference in a new issue