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.
This commit is contained in:
@@ -15,6 +15,7 @@ let
|
||||
inherit (pkgs) liminix;
|
||||
in
|
||||
{
|
||||
imports = [ ../ipv6-autoconfig ];
|
||||
options = {
|
||||
system.service.dnsmasq = mkOption {
|
||||
type = liminix.lib.types.serviceDefn;
|
||||
|
||||
@@ -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} \
|
||||
|
||||
Reference in New Issue
Block a user