From 7094f1ec0ee881898c8c06df044cf3611157e944 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Fri, 6 Oct 2023 01:46:12 +0800 Subject: [PATCH] nixos/dnsmasq: allow custom package Allow a custom package to be used for dnsmasq service. --- nixos/modules/services/networking/dnsmasq.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/dnsmasq.nix b/nixos/modules/services/networking/dnsmasq.nix index 4886654e8c03..14bbe334e50d 100644 --- a/nixos/modules/services/networking/dnsmasq.nix +++ b/nixos/modules/services/networking/dnsmasq.nix @@ -4,7 +4,7 @@ with lib; let cfg = config.services.dnsmasq; - dnsmasq = pkgs.dnsmasq; + dnsmasq = cfg.package; stateDir = "/var/lib/dnsmasq"; # True values are just put as `name` instead of `name=true`, and false values @@ -53,6 +53,8 @@ in ''; }; + package = mkPackageOptionMD pkgs "dnsmasq" {}; + resolveLocalQueries = mkOption { type = types.bool; default = true;