commit 91e957ced7fc6c83caadbaa50495f8c04ef46f4a
parent 899f096346b67369639c6256aa248ce753deaba7
Author: Daniel Barlow <dan@telent.net>
Date: Mon, 4 Sep 2023 23:07:13 +0100
static leases for rotuer
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -5,3 +5,4 @@ result-*
*.qcow2
_build
*-secrets.nix
+examples/static-leases.nix
diff --git a/examples/rotuer.nix b/examples/rotuer.nix
@@ -97,8 +97,17 @@ in rec {
inherit interface;
ranges = [
"10.8.0.10,10.8.0.240"
+ # ra-stateless: sends router advertisements with the O and A
+ # bits set, and provides a stateless DHCP service. The client
+ # will use a SLAAC address, and use DHCP for other
+ # configuration information.
"::,constructor:$(output ${interface} ifname),ra-stateless"
];
+
+ # You can add static addresses for the DHCP server here. I'm
+ # not putting my actual MAC addresses in a public git repo ...
+ hosts = { } // lib.optionalAttrs (builtins.pathExists ./static-leases.nix) (import ./static-leases.nix);
+
domain = "fake.liminix.org";
};