From 2890af5e4bf5badd939e30651e2328ddb4e7647c Mon Sep 17 00:00:00 2001 From: datafoo <34766150+datafoo@users.noreply.github.com> Date: Thu, 20 Apr 2023 11:52:57 +0200 Subject: nixos/acme: fix options type null is a possible default so the type must reflect that. --- nixos/modules/security/acme/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/security/acme/default.nix b/nixos/modules/security/acme/default.nix index ef0636258994c..a9b52b717772a 100644 --- a/nixos/modules/security/acme/default.nix +++ b/nixos/modules/security/acme/default.nix @@ -487,7 +487,7 @@ let }; email = mkOption { - type = types.str; + type = types.nullOr types.str; inherit (defaultAndText "email" null) default defaultText; description = lib.mdDoc '' Email address for account creation and correspondence from the CA. @@ -555,7 +555,7 @@ let }; credentialsFile = mkOption { - type = types.path; + type = types.nullOr types.path; inherit (defaultAndText "credentialsFile" null) default defaultText; description = lib.mdDoc '' Path to an EnvironmentFile for the cert's service containing any required and -- cgit 1.4.1 From 9c1f292155efcefc147186d76921874a16caee01 Mon Sep 17 00:00:00 2001 From: IndeedNotJames Date: Wed, 12 Apr 2023 03:50:48 +0200 Subject: nixos/consul: fix package reference in service `$PATH` --- nixos/modules/services/networking/consul.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/modules/services/networking/consul.nix b/nixos/modules/services/networking/consul.nix index f1c36138be3e4..4a9d0f4c3d194 100644 --- a/nixos/modules/services/networking/consul.nix +++ b/nixos/modules/services/networking/consul.nix @@ -210,7 +210,7 @@ in ExecStop = "${cfg.package}/bin/consul leave"; }); - path = with pkgs; [ iproute2 gnugrep gawk consul ]; + path = with pkgs; [ iproute2 gawk cfg.package ]; preStart = let family = if cfg.forceAddrFamily == "ipv6" then "-6" -- cgit 1.4.1 From 6ad64af778b6f44a0e8a7ca0e74f21d3c4089054 Mon Sep 17 00:00:00 2001 From: IndeedNotJames Date: Wed, 12 Apr 2023 03:50:48 +0200 Subject: nixos/consul: use `lib.getExe` where possible which allows the use of custom packages, that may not have binaries called `consul` or `consul-alerts` in their `/bin/*` (though arguably pretty unlikely to be ever used) --- nixos/modules/services/networking/consul.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/networking/consul.nix b/nixos/modules/services/networking/consul.nix index 4a9d0f4c3d194..955463b9031eb 100644 --- a/nixos/modules/services/networking/consul.nix +++ b/nixos/modules/services/networking/consul.nix @@ -199,7 +199,7 @@ in (filterAttrs (n: _: hasPrefix "consul.d/" n) config.environment.etc); serviceConfig = { - ExecStart = "@${cfg.package}/bin/consul consul agent -config-dir /etc/consul.d" + ExecStart = "@${lib.getExe cfg.package} consul agent -config-dir /etc/consul.d" + concatMapStrings (n: " -config-file ${n}") configFiles; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; PermissionsStartOnly = true; @@ -207,7 +207,7 @@ in Restart = "on-failure"; TimeoutStartSec = "infinity"; } // (optionalAttrs (cfg.leaveOnStop) { - ExecStop = "${cfg.package}/bin/consul leave"; + ExecStop = "${lib.getExe cfg.package} leave"; }); path = with pkgs; [ iproute2 gawk cfg.package ]; @@ -269,7 +269,7 @@ in serviceConfig = { ExecStart = '' - ${cfg.alerts.package}/bin/consul-alerts start \ + ${lib.getExe cfg.alerts.package} start \ --alert-addr=${cfg.alerts.listenAddr} \ --consul-addr=${cfg.alerts.consulAddr} \ ${optionalString cfg.alerts.watchChecks "--watch-checks"} \ -- cgit 1.4.1 From 254180d5089523bfe9011b510df13981b263296e Mon Sep 17 00:00:00 2001 From: IndeedNotJames Date: Wed, 19 Apr 2023 09:11:00 +0200 Subject: nixosTests.gitea: fix sshd race condition --- nixos/tests/gitea.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'nixos') diff --git a/nixos/tests/gitea.nix b/nixos/tests/gitea.nix index 86d4fce379291..c38aad1f44ece 100644 --- a/nixos/tests/gitea.nix +++ b/nixos/tests/gitea.nix @@ -72,6 +72,7 @@ let server.wait_for_unit("gitea.service") server.wait_for_open_port(3000) + server.wait_for_open_port(22) server.succeed("curl --fail http://localhost:3000/") server.succeed( -- cgit 1.4.1 From 0a8004f496612a3ec179695ff2304855124bddb9 Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Wed, 19 Apr 2023 12:19:58 +0200 Subject: asterisk: drop 16 and 19 These will go EOL within the 23.05 support window. --- nixos/doc/manual/release-notes/rl-2305.section.md | 2 ++ pkgs/servers/asterisk/default.nix | 5 ++--- pkgs/top-level/aliases.nix | 2 ++ pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'nixos') diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 601109ccee5e4..a89c46152cab4 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -229,6 +229,8 @@ In addition to numerous new and upgraded packages, this release has the followin - To enable the HTTP3 (QUIC) protocol for a nginx virtual host, set the `quic` attribute on it to true, e.g. `services.nginx.virtualHosts..quic = true;`. +- The default Asterisk package was changed to v20 from v19. Asterisk versions 16 and 19 have been dropped due to being EOL. You may need to update /var/lib/asterisk to match the template files in `${asterisk-20}/var/lib/asterisk`. + - conntrack helper autodetection has been removed from kernels 6.0 and up upstream, and an assertion was added to ensure things don't silently stop working. Migrate your configuration to assign helpers explicitly or use an older LTS kernel branch as a temporary workaround. - The `services.pipewire.config` options have been removed, as they have basically never worked correctly. All behavior defined by the default configuration can be overridden with drop-in files as necessary - see [below](#sec-release-23.05-migration-pipewire) for details. diff --git a/pkgs/servers/asterisk/default.nix b/pkgs/servers/asterisk/default.nix index c49e5696a6769..bf8e2ed740f67 100644 --- a/pkgs/servers/asterisk/default.nix +++ b/pkgs/servers/asterisk/default.nix @@ -199,8 +199,7 @@ let exec ${updateScript_python}/bin/python ${toString ./update.py} ''; -in -{ +in { # Supported releases (as of 2023-04-19). # v16 and v19 have been dropped because they go EOL before the NixOS 23.11 release. # Source: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions @@ -215,7 +214,7 @@ in asterisk-lts = versions.asterisk_18; asterisk-stable = versions.asterisk_20; asterisk = versions.asterisk_20.overrideAttrs (o: { - passthru = (o.passthru or { }) // { inherit updateScript; }; + passthru = (o.passthru or {}) // { inherit updateScript; }; }); } // versions diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 27010136f5e19..95004ba483ab2 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -98,7 +98,9 @@ mapAliases ({ asls = throw "asls has been removed: abandoned by upstream"; # Added 2023-03-16 asterisk_13 = throw "asterisk_13: Asterisk 13 is end of life and has been removed"; # Added 2022-04-06 asterisk_15 = throw "asterisk_15: Asterisk 15 is end of life and has been removed"; # Added 2020-10-07 + asterisk_16 = throw "asterisk_16: Asterisk 16 is end of life and has been removed"; # Added 2023-04-19 asterisk_17 = throw "asterisk_17: Asterisk 17 is end of life and has been removed"; # Added 2022-04-06 + asterisk_19 = throw "asterisk_19: Asterisk 19 is end of life and has been removed"; # Added 2023-04-19 at_spi2_atk = throw "'at_spi2_atk' has been renamed to/replaced by 'at-spi2-atk'"; # Converted to throw 2022-02-22 at_spi2_core = throw "'at_spi2_core' has been renamed to/replaced by 'at-spi2-core'"; # Converted to throw 2022-02-22 aucdtect = throw "aucdtect: Upstream no longer provides download urls"; # Added 2020-12-26 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e9355cb9c78c8..e225023050a24 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24864,7 +24864,7 @@ with pkgs; inherit (callPackages ../servers/asterisk { }) asterisk asterisk-stable asterisk-lts - asterisk_16 asterisk_18 asterisk_19 asterisk_20; + asterisk_18 asterisk_20; asterisk-module-sccp = callPackage ../servers/asterisk/sccp { }; -- cgit 1.4.1