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;
|
||||
subnet = mkSubnet "10.80.1.0/24" "2001:470:73b9:1::/64";
|
||||
domain = "lan.shinonome-lab.de";
|
||||
avahi = true;
|
||||
};
|
||||
management = {
|
||||
id = 20;
|
||||
subnet = mkSubnet "10.80.2.0/24" "2001:470:73b9:2::/64";
|
||||
domain = "management.shinonome-lab.de";
|
||||
avahi = false;
|
||||
};
|
||||
guest = {
|
||||
id = 30;
|
||||
subnet = mkSubnet "10.80.3.0/24" "2001:470:73b9:3::/64";
|
||||
domain = "guest.shinonome-lab.de";
|
||||
avahi = false;
|
||||
};
|
||||
iot = {
|
||||
id = 40;
|
||||
subnet = mkSubnet "10.80.4.0/24" "2001:470:73b9:4::/64";
|
||||
domain = "iot.shinonome-lab.de";
|
||||
avahi = true;
|
||||
};
|
||||
printer = {
|
||||
id = 41;
|
||||
subnet = mkSubnet "10.80.5.0/24" "2001:470:73b9:5::/64";
|
||||
domain = "printer.shinonome-lab.de";
|
||||
avahi = true;
|
||||
};
|
||||
};
|
||||
tc = {
|
||||
|
|
|
@ -31,6 +31,7 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
./avahi.nix
|
||||
./dnsmasq.nix
|
||||
./nft.nix
|
||||
./tc.nix
|
||||
|
|
Loading…
Reference in a new issue