commit 9f21c3036f28394756b2ab1feb42acb847a17876
parent 40194d53517fad36b387e7ce197a365f7582fec9
Author: Daniel Barlow <dan@telent.net>
Date: Tue, 11 Nov 2025 21:09:19 +0000
dnsmasq: set ipv6 autoconfig in "router" mode
dnsmasq is configured to send RA, so the interface it's running on
should not also be accepting RA.
Diffstat:
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/modules/dnsmasq/default.nix b/modules/dnsmasq/default.nix
@@ -15,6 +15,7 @@ let
inherit (pkgs) liminix;
in
{
+ imports = [ ../ipv6-autoconfig ];
options = {
system.service.dnsmasq = mkOption {
type = liminix.lib.types.serviceDefn;
diff --git a/modules/dnsmasq/service.nix b/modules/dnsmasq/service.nix
@@ -3,6 +3,7 @@
dnsmasq,
serviceFns,
lib,
+ svc,
}:
{
interface,
@@ -30,10 +31,17 @@ let
v6s = concatStrings (map (a: ",[${a}]") v6);
in
"--dhcp-host=${mac},${v4}${v6s},${name},${builtins.toString leasetime}";
+ autoconfig = svc.ipv6.autoconfig.build {
+ inherit interface;
+ role = "router";
+ };
in
longrun {
inherit name;
- dependencies = [ interface ];
+ dependencies = [
+ interface
+ autoconfig
+ ];
run = ''
${dnsmasq}/bin/dnsmasq \
--user=${user} \