From a4b6e457b8cef338277a4059aecabec0e120b0f2 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 23 Mar 2024 15:59:50 +0100 Subject: [PATCH 1/2] nixos/lib: Support derivations in escapeSystemdExecArg They can be transformed into their outpath string, which is useful for config generators. --- nixos/lib/utils.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index 49ba2e5c8386..22a2c79843c6 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -64,8 +64,8 @@ rec { let s = if builtins.isPath arg then "${arg}" else if builtins.isString arg then arg - else if builtins.isInt arg || builtins.isFloat arg then toString arg - else throw "escapeSystemdExecArg only allows strings, paths and numbers"; + else if builtins.isInt arg || builtins.isFloat arg || lib.isDerivation arg then toString arg + else throw "escapeSystemdExecArg only allows strings, paths, numbers and derivations"; in replaceStrings [ "%" "$" ] [ "%%" "$$" ] (builtins.toJSON s); From acac5b417f3aceed8312222b936145980273a287 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 23 Mar 2024 16:15:08 +0100 Subject: [PATCH 2/2] kea: drop removed nixos test The exporter test was migrated into the primary kea test. --- pkgs/tools/networking/kea/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/tools/networking/kea/default.nix b/pkgs/tools/networking/kea/default.nix index 574afb68e237..5bdb7bd7607b 100644 --- a/pkgs/tools/networking/kea/default.nix +++ b/pkgs/tools/networking/kea/default.nix @@ -87,7 +87,6 @@ stdenv.mkDerivation rec { passthru.tests = { kea = nixosTests.kea; prefix-delegation = nixosTests.systemd-networkd-ipv6-prefix-delegation; - prometheus-exporter = nixosTests.prometheus-exporters.kea; networking-scripted = lib.recurseIntoAttrs { inherit (nixosTests.networking.scripted) dhcpDefault dhcpSimple dhcpOneIf; }; networking-networkd = lib.recurseIntoAttrs { inherit (nixosTests.networking.networkd) dhcpDefault dhcpSimple dhcpOneIf; }; };