Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into staging-next
Browse files Browse the repository at this point in the history
Conflicts:
- pkgs/development/python-modules/laundrify-aio/default.nix
  • Loading branch information
mweinelt committed Aug 11, 2024
2 parents b110ca4 + e7f2456 commit 182792a
Show file tree
Hide file tree
Showing 52 changed files with 932 additions and 378 deletions.
5 changes: 5 additions & 0 deletions maintainers/scripts/pluginupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,11 @@ def update_plugins(editor: Editor, args):
All input arguments are grouped in the `Editor`."""

log.info("Start updating plugins")
if args.proc > 1 and args.github_token == None:
log.warning("You have enabled parallel updates but haven't set a github token.\n"
"You may be hit with `HTTP Error 429: too many requests` as a consequence."
"Either set --proc=1 or --github-token=YOUR_TOKEN. ")

fetch_config = FetchConfig(args.proc, args.github_token)
update = editor.get_update(args.input_file, args.outfile, fetch_config)

Expand Down
2 changes: 1 addition & 1 deletion nixos/doc/manual/release-notes/rl-2311.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
- [trust-dns](https://trust-dns.org/), a Rust based DNS server built to be safe
and secure from the ground up. Available as
[services.trust-dns](#opt-services.trust-dns.enable).
`services.trust-dns`.
- [osquery](https://www.osquery.io/), a SQL powered operating system
instrumentation, monitoring, and analytics. Available as
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2411.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@

- 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`.

- The `services.trust-dns` module has been renamed to `services.hickory-dns`.

## Other Notable Changes {#sec-release-24.11-notable-changes}

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@
./services/networking/harmonia.nix
./services/networking/haproxy.nix
./services/networking/headscale.nix
./services/networking/hickory-dns.nix
./services/networking/hostapd.nix
./services/networking/htpdate.nix
./services/networking/https-dns-proxy.nix
Expand Down Expand Up @@ -1234,7 +1235,6 @@
./services/networking/tox-node.nix
./services/networking/toxvpn.nix
./services/networking/trickster.nix
./services/networking/trust-dns.nix
./services/networking/tvheadend.nix
./services/networking/twingate.nix
./services/networking/ucarp.nix
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ config, lib, pkgs, ... }:
let
cfg = config.services.trust-dns;
cfg = config.services.hickory-dns;
toml = pkgs.formats.toml { };

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

Expand All @@ -26,7 +26,7 @@ let
- "Forward" (a cached zone where all requests are forwarded to another resolver).
For more details about these zone types, consult the documentation for BIND,
though note that trust-dns supports only a subset of BIND's zone types:
though note that hickory-dns supports only a subset of BIND's zone types:
<https://bind9.readthedocs.io/en/v9_18_4/reference.html#type>
'';
};
Expand All @@ -45,10 +45,19 @@ let
in
{
meta.maintainers = with lib.maintainers; [ colinsane ];

imports = with lib; [
(mkRenamedOptionModule [ "services" "trust-dns" "enable" ] [ "services" "hickory-dns" "enable" ])
(mkRenamedOptionModule [ "services" "trust-dns" "package" ] [ "services" "hickory-dns" "package" ])
(mkRenamedOptionModule [ "services" "trust-dns" "settings" ] [ "services" "hickory-dns" "settings" ])
(mkRenamedOptionModule [ "services" "trust-dns" "quiet" ] [ "services" "hickory-dns" "quiet" ])
(mkRenamedOptionModule [ "services" "trust-dns" "debug" ] [ "services" "hickory-dns" "debug" ])
];

options = {
services.trust-dns = with lib; {
enable = mkEnableOption "trust-dns";
package = mkPackageOption pkgs "trust-dns" {
services.hickory-dns = with lib; {
enable = mkEnableOption "hickory-dns";
package = mkPackageOption pkgs "hickory-dns" {
extraDescription = ''
::: {.note}
The package must provide `meta.mainProgram` which names the server binary; any other utilities (client, resolver) are not needed.
Expand All @@ -75,9 +84,9 @@ in
};
settings = mkOption {
description = ''
Settings for trust-dns. The options enumerated here are not exhaustive.
Settings for hickory-dns. The options enumerated here are not exhaustive.
Refer to upstream documentation for all available options:
- [Example settings](https://github.com/bluejekyll/trust-dns/blob/main/tests/test-data/test_configs/example.toml)
- [Example settings](https://github.com/hickory-dns/hickory-dns/blob/main/tests/test-data/test_configs/example.toml)
'';
type = types.submodule {
freeformType = toml.type;
Expand Down Expand Up @@ -106,9 +115,9 @@ in
};
directory = mkOption {
type = types.str;
default = "/var/lib/trust-dns";
default = "/var/lib/hickory-dns";
description = ''
The directory in which trust-dns should look for .zone files,
The directory in which hickory-dns should look for .zone files,
whenever zones aren't specified by absolute path.
'';
};
Expand All @@ -124,23 +133,23 @@ in
};

config = lib.mkIf cfg.enable {
systemd.services.trust-dns = {
description = "trust-dns Domain Name Server";
unitConfig.Documentation = "https://trust-dns.org/";
systemd.services.hickory-dns = {
description = "hickory-dns Domain Name Server";
unitConfig.Documentation = "https://hickory-dns.org/";
serviceConfig = {
ExecStart =
let
flags = (lib.optional cfg.debug "--debug") ++ (lib.optional cfg.quiet "--quiet");
flagsStr = builtins.concatStringsSep " " flags;
in ''
${cfg.package}/bin/${cfg.package.meta.mainProgram} --config ${configFile} ${flagsStr}
${lib.getExe cfg.package} --config ${configFile} ${flagsStr}
'';
Type = "simple";
Restart = "on-failure";
RestartSec = "10s";
DynamicUser = true;

StateDirectory = "trust-dns";
StateDirectory = "hickory-dns";
ReadWritePaths = [ cfg.settings.directory ];

AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
Expand Down
Loading

0 comments on commit 182792a

Please sign in to comment.