Loading nixos/doc/manual/release-notes/rl-2311.section.md +1 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ - `pass` now does not contain `password-store.el`. Users should get `password-store.el` from Emacs lisp package set `emacs.pkgs.password-store`. - `services.knot` now supports `.settings` from RFC42. The change is not 100% compatible with the previous `.extraConfig`. - `services.knot` now supports `.settings` from RFC42. The previous `.extraConfig` still works the same, but it displays a warning now. - `mu` now does not install `mu4e` files by default. Users should get `mu4e` from Emacs lisp package set `emacs.pkgs.mu4e`. Loading nixos/modules/services/networking/knot.nix +10 −6 Original line number Diff line number Diff line Loading @@ -103,11 +103,15 @@ let in result; configFile = if cfg.settingsFile != null then assert cfg.settings == {} && cfg.keyFiles == []; # Note: with extraConfig, the 23.05 compat code did include keyFiles from settingsFile. assert cfg.settings == {} && (cfg.keyFiles == [] || cfg.extraConfig != null); cfg.settingsFile else pkgs.writeTextFile { else mkConfigFile yamlConfig; mkConfigFile = configString: pkgs.writeTextFile { name = "knot.conf"; text = (concatMapStringsSep "\n" (file: "include: ${file}") cfg.keyFiles) + "\n" + yamlConfig; text = (concatMapStringsSep "\n" (file: "include: ${file}") cfg.keyFiles) + "\n" + configString; # TODO: maybe we could do some checks even when private keys complicate this? checkPhase = lib.optionalString (cfg.keyFiles == []) '' ${cfg.package}/bin/knotc --config=$out conf-check Loading Loading @@ -174,7 +178,7 @@ in { description = lib.mdDoc '' As alternative to ``settings``, you can provide whole configuration directly in the almost-YAML format of Knot DNS. You might want to utilize ``writeTextFile`` for this. You might want to utilize ``pkgs.writeText "knot.conf" "longConfigString"`` for this. ''; }; Loading @@ -189,9 +193,9 @@ in { }; }; imports = [ # Compatibility with NixOS 23.05. At least partial, as it fails assert if used with keyFiles. # Compatibility with NixOS 23.05. (mkChangedOptionModule [ "services" "knot" "extraConfig" ] [ "services" "knot" "settingsFile" ] (config: pkgs.writeText "knot.conf" config.services.knot.extraConfig) (config: mkConfigFile config.services.knot.extraConfig) ) ]; Loading Loading
nixos/doc/manual/release-notes/rl-2311.section.md +1 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ - `pass` now does not contain `password-store.el`. Users should get `password-store.el` from Emacs lisp package set `emacs.pkgs.password-store`. - `services.knot` now supports `.settings` from RFC42. The change is not 100% compatible with the previous `.extraConfig`. - `services.knot` now supports `.settings` from RFC42. The previous `.extraConfig` still works the same, but it displays a warning now. - `mu` now does not install `mu4e` files by default. Users should get `mu4e` from Emacs lisp package set `emacs.pkgs.mu4e`. Loading
nixos/modules/services/networking/knot.nix +10 −6 Original line number Diff line number Diff line Loading @@ -103,11 +103,15 @@ let in result; configFile = if cfg.settingsFile != null then assert cfg.settings == {} && cfg.keyFiles == []; # Note: with extraConfig, the 23.05 compat code did include keyFiles from settingsFile. assert cfg.settings == {} && (cfg.keyFiles == [] || cfg.extraConfig != null); cfg.settingsFile else pkgs.writeTextFile { else mkConfigFile yamlConfig; mkConfigFile = configString: pkgs.writeTextFile { name = "knot.conf"; text = (concatMapStringsSep "\n" (file: "include: ${file}") cfg.keyFiles) + "\n" + yamlConfig; text = (concatMapStringsSep "\n" (file: "include: ${file}") cfg.keyFiles) + "\n" + configString; # TODO: maybe we could do some checks even when private keys complicate this? checkPhase = lib.optionalString (cfg.keyFiles == []) '' ${cfg.package}/bin/knotc --config=$out conf-check Loading Loading @@ -174,7 +178,7 @@ in { description = lib.mdDoc '' As alternative to ``settings``, you can provide whole configuration directly in the almost-YAML format of Knot DNS. You might want to utilize ``writeTextFile`` for this. You might want to utilize ``pkgs.writeText "knot.conf" "longConfigString"`` for this. ''; }; Loading @@ -189,9 +193,9 @@ in { }; }; imports = [ # Compatibility with NixOS 23.05. At least partial, as it fails assert if used with keyFiles. # Compatibility with NixOS 23.05. (mkChangedOptionModule [ "services" "knot" "extraConfig" ] [ "services" "knot" "settingsFile" ] (config: pkgs.writeText "knot.conf" config.services.knot.extraConfig) (config: mkConfigFile config.services.knot.extraConfig) ) ]; Loading