Propagate --override-input's to nix run .#microvm-update-*

This commit is contained in:
Sandro - 2023-01-06 21:06:39 +01:00
parent 18a2bef4fc
commit 814590616e
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 6 additions and 1 deletions

View File

@ -8,8 +8,12 @@ let
hostConf.ip4 or hostConf.ip6;
# all the input flakes for `nix copy` to the build machine,
# allowing --override-input
# to be available for --override-input
inputPaths = lib.escapeShellArgs (builtins.attrValues inputs);
overrideInputsArgs = lib.concatStringsSep " " (builtins.attrValues (lib.mapAttrs
(name: value: "--override-input ${name} ${value}")
(lib.filterAttrs (name: value: name != "self") inputs)
));
in
lib.attrsets.mapAttrs
(system: pkgs:
@ -168,6 +172,7 @@ lib.attrsets.mapAttrs
[ -e current ] && cp --no-dereference current old
nix build -L --accept-flake-config -o current \
${overrideInputsArgs} \
${self}#nixosConfigurations.${name}.config.microvm.declaredRunner
echo '${selfRef}' > flake