Skip to content

Commit

Permalink
nixos/dnsmasq: remove deprecated option "extraConfig"
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoriguchi committed Aug 20, 2024
1 parent f02fa2f commit e975116
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions nixos/modules/services/networking/dnsmasq.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ let
listsAsDuplicateKeys = true;
};

# Because formats.generate is outputting a file, we use of conf-file. Once
# `extraConfig` is deprecated we can just use
# `dnsmasqConf = format.generate "dnsmasq.conf" cfg.settings`
dnsmasqConf = pkgs.writeText "dnsmasq.conf" ''
conf-file=${settingsFormat.generate "dnsmasq.conf" cfg.settings}
${cfg.extraConfig}
'';
dnsmasqConf = settingsFormat.generate "dnsmasq.conf" cfg.settings;

in

Expand Down Expand Up @@ -107,17 +101,6 @@ in
'';
};

extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration directives that should be added to
`dnsmasq.conf`.
This option is deprecated, please use {option}`settings` instead.
'';
};

};

};
Expand All @@ -127,8 +110,6 @@ in

config = mkIf cfg.enable {

warnings = lib.optional (cfg.extraConfig != "") "Text based config is deprecated, dnsmasq now supports `services.dnsmasq.settings` for an attribute-set based config";

services.dnsmasq.settings = {
dhcp-leasefile = mkDefault "${stateDir}/dnsmasq.leases";
conf-file = mkDefault (optional cfg.resolveLocalQueries "/etc/dnsmasq-conf.conf");
Expand Down

0 comments on commit e975116

Please sign in to comment.