From 4bdf75f1cb5c2238482ec86b3dadfafb034a0900 Mon Sep 17 00:00:00 2001 From: williamvds Date: Tue, 4 Apr 2023 23:38:04 +0100 Subject: [PATCH] dnsmasq: pass through config file as an option So that the pihole module reuse it. pihole-ftl is a fork of dnsmasq and its configuration file is compatible. --- nixos/modules/services/networking/dnsmasq.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/dnsmasq.nix b/nixos/modules/services/networking/dnsmasq.nix index 92cd2c7caed7..b345b51d4bda 100644 --- a/nixos/modules/services/networking/dnsmasq.nix +++ b/nixos/modules/services/networking/dnsmasq.nix @@ -115,6 +115,12 @@ in ''; }; + configFile = lib.mkOption { + type = lib.types.package; + default = dnsmasqConf; + internal = true; + }; + }; }; @@ -172,7 +178,7 @@ in serviceConfig = { Type = "dbus"; BusName = "uk.org.thekelleys.dnsmasq"; - ExecStart = "${dnsmasq}/bin/dnsmasq -k --enable-dbus --user=dnsmasq -C ${dnsmasqConf}"; + ExecStart = "${dnsmasq}/bin/dnsmasq -k --enable-dbus --user=dnsmasq -C ${cfg.configFile}"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; PrivateTmp = true; ProtectSystem = true;