From ff542c9f51f22b637278e1db2bac146ba7499bff Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 6 Apr 2023 17:52:52 -0700 Subject: 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. --- hosts/carmel/services.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hosts/carmel/services.nix') 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 -- cgit 1.4.1