diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index ef4dddf757b7c0e..9737b16f5b5791d 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -409,6 +409,8 @@ - The `openlens` package got removed, suggested replacment `lens-desktop` +- The `services.dnsmasq.extraConfig` option has been removed, as it had been deprecated for over 2 years. This option is replaced by `services.dnsmasq.settings`. + ## Other Notable Changes {#sec-release-24.11-notable-changes} diff --git a/nixos/modules/services/networking/dnsmasq.nix b/nixos/modules/services/networking/dnsmasq.nix index e9052cdd3faefc3..6cfe24f70c94f27 100644 --- a/nixos/modules/services/networking/dnsmasq.nix +++ b/nixos/modules/services/networking/dnsmasq.nix @@ -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 @@ -37,6 +31,7 @@ in imports = [ (mkRenamedOptionModule [ "services" "dnsmasq" "servers" ] [ "services" "dnsmasq" "settings" "server" ]) + (mkRemovedOptionModule [ "services" "dnsmasq" "extraConfig" ] "This option is replaced by `services.dnsmasq.settings`") ]; ###### interface @@ -107,17 +102,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. - ''; - }; - }; }; @@ -127,8 +111,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"); diff --git a/nixos/modules/services/networking/nixops-dns.nix b/nixos/modules/services/networking/nixops-dns.nix index 5e33d872ea452c6..5d009d6d30845c8 100644 --- a/nixos/modules/services/networking/nixops-dns.nix +++ b/nixos/modules/services/networking/nixops-dns.nix @@ -68,10 +68,10 @@ in servers = [ "/${cfg.domain}/127.0.0.1#5300" ]; - extraConfig = '' - bind-interfaces - listen-address=127.0.0.1 - ''; + settings = { + bind-interfaces = true; + listen-address = "127.0.0.1"; + }; }; };