about summary refs log tree commit diff
path: root/modules/services/avahi
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-03-18 11:58:35 -0700
committerFranck Cuny <franck@fcuny.net>2023-04-03 17:53:02 -0700
commitc5a78751f96587bf4a3704143ac81598ee6c3e5b (patch)
treedaf41e9b05ade02118eaa08aabf9bac771e12c71 /modules/services/avahi
parentflake: fix URL for sendsms (diff)
downloadworld-c5a78751f96587bf4a3704143ac81598ee6c3e5b.tar.gz
hosts/carmel: reconfigure the host as a router
I'm not using it as a desktop, and the current router is getting old and
will likely fail in the near future. It's also a debian machine
configured manually, so let's reconfigure carmel as our new router.

There are three NICs in the host: 2 are 10Gb and one is 1Gb. The 1Gb
will be used as the upstream interface, and one of the 10Gb will be for
the LAN.

There are 2 VLANs to configure: one for IoT devices and one for guest.
Diffstat (limited to 'modules/services/avahi')
-rw-r--r--modules/services/avahi/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/services/avahi/default.nix b/modules/services/avahi/default.nix
index 8275f02..3a6eb58 100644
--- a/modules/services/avahi/default.nix
+++ b/modules/services/avahi/default.nix
@@ -4,6 +4,12 @@ in
 {
   options.my.services.avahi = with lib; {
     enable = mkEnableOption "avahi service";
+    withReflector = mkEnableOption "enable reflector";
+    interfaces = mkOption {
+      type = types.nullOr (types.listOf types.str);
+      default = null;
+      description = "List of network interfaces that should be used by the {command}`avahi-daemon`.";
+    };
   };
 
   config = lib.mkIf cfg.enable {
@@ -11,5 +17,8 @@ in
     # Important to resolve .local domains of printers, otherwise you get an error
     # like  "Impossible to connect to XXX.local: Name or service not known"
     services.avahi.nssmdns = true;
+
+    services.avahi.reflector = cfg.withReflector;
+    services.avahi.interfaces = cfg.interfaces;
   };
 }