From 9b87702839a0ac51dabff09a4e458388c0af1c60 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 12 Feb 2025 12:52:36 +0100 Subject: [PATCH] libvirt: enable to set START_DELAY from NixOS module Follow-up to f9ae842f. The NixOS module already provides that option since 2a848b37, but it never worked until now. Also, I've added a comment to add some explicitly. --- pkgs/development/libraries/libvirt/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index d5c6f1b6cf17..e83fd20e995f 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -352,11 +352,14 @@ stdenv.mkDerivation rec { substituteInPlace $out/bin/virt-xml-validate \ --replace xmllint ${libxml2}/bin/xmllint + # Enable to set some options from the corresponding NixOS module (or other + # places) via environment variables. substituteInPlace $out/libexec/libvirt-guests.sh \ --replace 'ON_BOOT="start"' 'ON_BOOT=''${ON_BOOT:-start}' \ --replace 'ON_SHUTDOWN="suspend"' 'ON_SHUTDOWN=''${ON_SHUTDOWN:-suspend}' \ --replace 'PARALLEL_SHUTDOWN=0' 'PARALLEL_SHUTDOWN=''${PARALLEL_SHUTDOWN:-0}' \ --replace 'SHUTDOWN_TIMEOUT=300' 'SHUTDOWN_TIMEOUT=''${SHUTDOWN_TIMEOUT:-300}' \ + --replace 'START_DELAY=0' 'START_DELAY=''${START_DELAY:-0}' \ --replace "$out/bin" '${gettext}/bin' \ --replace 'lock/subsys' 'lock' \ --replace 'gettext.sh' 'gettext.sh