diff options
author | Franck Cuny <franck@fcuny.net> | 2023-04-06 17:52:52 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-04-06 19:21:19 -0700 |
commit | ff542c9f51f22b637278e1db2bac146ba7499bff (patch) | |
tree | 81ee1c8a21d3f18a56d8c2bea8532cd73d982f89 /hosts | |
parent | tools/dnsmasq-leases-html: create a HTML page with leases from dnsmasq (diff) | |
download | world-ff542c9f51f22b637278e1db2bac146ba7499bff.tar.gz |
hosts/carmel: run dnsmasql-to-html when leases change
The option `dhcp-script` can be used to run a script every time a new lease is added or deleted. We configure this option to run the script that generates a static HTML file with the leases.
Diffstat (limited to '')
-rw-r--r-- | hosts/carmel/services.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hosts/carmel/services.nix b/hosts/carmel/services.nix index 7facf4a..d469618 100644 --- a/hosts/carmel/services.nix +++ b/hosts/carmel/services.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{ config, pkgs, ... }: { my.services = { metrics-exporter = { enable = true; }; avahi = { @@ -26,6 +26,9 @@ local=/home/ no-resolv + dhcp-script=${pkgs.tools.dnsmasq-to-html}/bin/dnsmasq-leases-html + script-on-renewal + dhcp-authoritative interface=mgmt0 |