Skip to content

Commit 0536436

Browse files
Merge pull request #316466 from uninsane/rebrand-trust-dns
hickory-dns: rename from trust-dns
2 parents e8aed17 + f9df950 commit 0536436

File tree

7 files changed

+32
-22
lines changed

7 files changed

+32
-22
lines changed

nixos/doc/manual/release-notes/rl-2311.section.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
10171017

10181018
- [trust-dns](https://trust-dns.org/), a Rust based DNS server built to be safe
10191019
and secure from the ground up. Available as
1020-
[services.trust-dns](#opt-services.trust-dns.enable).
1020+
`services.trust-dns`.
10211021

10221022
- [osquery](https://www.osquery.io/), a SQL powered operating system
10231023
instrumentation, monitoring, and analytics. Available as

nixos/doc/manual/release-notes/rl-2411.section.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@
307307

308308
- The `xdg.portal.gtkUsePortal` option has been removed, as it had been deprecated for over 2 years. Using the `GTK_USE_PORTAL` environment variable in this manner is not intended nor encouraged by the GTK developers, but can still be done manually via `environment.sessionVariables`.
309309

310+
- The `services.trust-dns` module has been renamed to `services.hickory-dns`.
311+
310312
## Other Notable Changes {#sec-release-24.11-notable-changes}
311313

312314
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

nixos/modules/module-list.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,7 @@
10471047
./services/networking/harmonia.nix
10481048
./services/networking/haproxy.nix
10491049
./services/networking/headscale.nix
1050+
./services/networking/hickory-dns.nix
10501051
./services/networking/hostapd.nix
10511052
./services/networking/htpdate.nix
10521053
./services/networking/https-dns-proxy.nix
@@ -1234,7 +1235,6 @@
12341235
./services/networking/tox-node.nix
12351236
./services/networking/toxvpn.nix
12361237
./services/networking/trickster.nix
1237-
./services/networking/trust-dns.nix
12381238
./services/networking/tvheadend.nix
12391239
./services/networking/twingate.nix
12401240
./services/networking/ucarp.nix

nixos/modules/services/networking/trust-dns.nix renamed to nixos/modules/services/networking/hickory-dns.nix

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{ config, lib, pkgs, ... }:
22
let
3-
cfg = config.services.trust-dns;
3+
cfg = config.services.hickory-dns;
44
toml = pkgs.formats.toml { };
55

6-
configFile = toml.generate "trust-dns.toml" (
6+
configFile = toml.generate "hickory-dns.toml" (
77
lib.filterAttrsRecursive (_: v: v != null) cfg.settings
88
);
99

@@ -26,7 +26,7 @@ let
2626
- "Forward" (a cached zone where all requests are forwarded to another resolver).
2727
2828
For more details about these zone types, consult the documentation for BIND,
29-
though note that trust-dns supports only a subset of BIND's zone types:
29+
though note that hickory-dns supports only a subset of BIND's zone types:
3030
<https://bind9.readthedocs.io/en/v9_18_4/reference.html#type>
3131
'';
3232
};
@@ -45,10 +45,19 @@ let
4545
in
4646
{
4747
meta.maintainers = with lib.maintainers; [ colinsane ];
48+
49+
imports = with lib; [
50+
(mkRenamedOptionModule [ "services" "trust-dns" "enable" ] [ "services" "hickory-dns" "enable" ])
51+
(mkRenamedOptionModule [ "services" "trust-dns" "package" ] [ "services" "hickory-dns" "package" ])
52+
(mkRenamedOptionModule [ "services" "trust-dns" "settings" ] [ "services" "hickory-dns" "settings" ])
53+
(mkRenamedOptionModule [ "services" "trust-dns" "quiet" ] [ "services" "hickory-dns" "quiet" ])
54+
(mkRenamedOptionModule [ "services" "trust-dns" "debug" ] [ "services" "hickory-dns" "debug" ])
55+
];
56+
4857
options = {
49-
services.trust-dns = with lib; {
50-
enable = mkEnableOption "trust-dns";
51-
package = mkPackageOption pkgs "trust-dns" {
58+
services.hickory-dns = with lib; {
59+
enable = mkEnableOption "hickory-dns";
60+
package = mkPackageOption pkgs "hickory-dns" {
5261
extraDescription = ''
5362
::: {.note}
5463
The package must provide `meta.mainProgram` which names the server binary; any other utilities (client, resolver) are not needed.
@@ -75,9 +84,9 @@ in
7584
};
7685
settings = mkOption {
7786
description = ''
78-
Settings for trust-dns. The options enumerated here are not exhaustive.
87+
Settings for hickory-dns. The options enumerated here are not exhaustive.
7988
Refer to upstream documentation for all available options:
80-
- [Example settings](https://github.com/bluejekyll/trust-dns/blob/main/tests/test-data/test_configs/example.toml)
89+
- [Example settings](https://github.com/hickory-dns/hickory-dns/blob/main/tests/test-data/test_configs/example.toml)
8190
'';
8291
type = types.submodule {
8392
freeformType = toml.type;
@@ -106,9 +115,9 @@ in
106115
};
107116
directory = mkOption {
108117
type = types.str;
109-
default = "/var/lib/trust-dns";
118+
default = "/var/lib/hickory-dns";
110119
description = ''
111-
The directory in which trust-dns should look for .zone files,
120+
The directory in which hickory-dns should look for .zone files,
112121
whenever zones aren't specified by absolute path.
113122
'';
114123
};
@@ -124,23 +133,23 @@ in
124133
};
125134

126135
config = lib.mkIf cfg.enable {
127-
systemd.services.trust-dns = {
128-
description = "trust-dns Domain Name Server";
129-
unitConfig.Documentation = "https://trust-dns.org/";
136+
systemd.services.hickory-dns = {
137+
description = "hickory-dns Domain Name Server";
138+
unitConfig.Documentation = "https://hickory-dns.org/";
130139
serviceConfig = {
131140
ExecStart =
132141
let
133142
flags = (lib.optional cfg.debug "--debug") ++ (lib.optional cfg.quiet "--quiet");
134143
flagsStr = builtins.concatStringsSep " " flags;
135144
in ''
136-
${cfg.package}/bin/${cfg.package.meta.mainProgram} --config ${configFile} ${flagsStr}
145+
${lib.getExe cfg.package} --config ${configFile} ${flagsStr}
137146
'';
138147
Type = "simple";
139148
Restart = "on-failure";
140149
RestartSec = "10s";
141150
DynamicUser = true;
142151

143-
StateDirectory = "trust-dns";
152+
StateDirectory = "hickory-dns";
144153
ReadWritePaths = [ cfg.settings.directory ];
145154

146155
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
}:
77

88
rustPlatform.buildRustPackage rec {
9-
pname = "trust-dns";
9+
pname = "hickory-dns";
1010
version = "0.24.1";
1111

1212
src = fetchFromGitHub {
@@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
1515
rev = "v${version}";
1616
hash = "sha256-szq21RuRmkhAfHlzhGQYpwjiIRkavFCPETOt+6TxhP4=";
1717
};
18-
cargoHash = "sha256-zGn5vHwsHgpkgOr30QiyScqnfXjH55LQIVtxoUUox64=";
18+
cargoHash = "sha256-LcMjHHEuDlhSfDXGIrSMXewraSxEgRw2g2DOoH4i5RU=";
1919

2020
buildInputs = [ openssl ];
2121
nativeBuildInputs = [ pkg-config ];
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
2525

2626
meta = with lib; {
2727
description = "Rust based DNS client, server, and resolver";
28-
homepage = "https://trust-dns.org/";
28+
homepage = "https://hickory-dns.org/";
2929
maintainers = with maintainers; [ colinsane ];
3030
platforms = platforms.linux;
3131
license = with licenses; [ asl20 mit ];

pkgs/top-level/aliases.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,6 +1467,7 @@ mapAliases ({
14671467
transifex-client = transifex-cli; # Added 2023-12-29
14681468
trezor_agent = trezor-agent; # Added 2024-01-07
14691469
openai-triton-llvm = triton-llvm; # added 2024-07-18
1470+
trust-dns = hickory-dns; # Added 2024-08-07
14701471
trustedGrub = throw "trustedGrub has been removed, because it is not maintained upstream anymore"; # Added 2023-05-10
14711472
trustedGrub-for-HP = throw "trustedGrub-for-HP has been removed, because it is not maintained upstream anymore"; # Added 2023-05-10
14721473
tumpa = throw "tumpa has been removed, as it is broken"; # Added 2024-07-15

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27362,8 +27362,6 @@ with pkgs;
2736227362
inherit (darwin.apple_sdk.frameworks) Security;
2736327363
};
2736427364

27365-
trust-dns = callPackage ../servers/dns/trust-dns { };
27366-
2736727365
trustymail = callPackage ../tools/security/trustymail { };
2736827366

2736927367
tunctl = callPackage ../os-specific/linux/tunctl { };

0 commit comments

Comments
 (0)