nixos-rebuild-ng: add missing FLAKE_FLAGS in nix eval calls

This commit is contained in:
Thiago Kenji Okada
2026-02-16 10:05:38 +00:00
parent 47e4c16675
commit dc0f2638f3
3 changed files with 8 additions and 0 deletions
@@ -314,6 +314,7 @@ def get_build_image_name_flake(
r = run_wrapper(
[
"nix",
*FLAKE_FLAGS,
"eval",
"--json",
flake.to_attr(
@@ -365,6 +366,7 @@ def get_build_image_variants_flake(
r = run_wrapper(
[
"nix",
*FLAKE_FLAGS,
"eval",
"--json",
flake.to_attr("config.system.build.images"),
@@ -386,6 +386,8 @@ def test_execute_nix_build_image_flake(mock_run: Mock, tmp_path: Path) -> None:
call(
[
"nix",
"--extra-experimental-features",
"nix-command flakes",
"eval",
"--json",
'/path/to/config#nixosConfigurations."hostname".config.system.build.images',
@@ -412,6 +414,8 @@ def test_execute_nix_build_image_flake(mock_run: Mock, tmp_path: Path) -> None:
call(
[
"nix",
"--extra-experimental-features",
"nix-command flakes",
"eval",
"--json",
'/path/to/config#nixosConfigurations."hostname".config.system.build.images.azure.passthru.filePath',
@@ -394,6 +394,8 @@ def test_get_build_image_variants_flake(mock_run: Mock) -> None:
mock_run.assert_called_with(
[
"nix",
"--extra-experimental-features",
"nix-command flakes",
"eval",
"--json",
"/flake.nix#myAttr.config.system.build.images",