cli vars generate: mount test_store into bwrap
This commit is contained in:
@@ -17,7 +17,7 @@ from clan_cli.completions import (
|
||||
from clan_cli.errors import ClanError
|
||||
from clan_cli.git import commit_files
|
||||
from clan_cli.machines.inventory import get_all_machines, get_selected_machines
|
||||
from clan_cli.nix import nix_shell
|
||||
from clan_cli.nix import nix_shell, nix_test_store
|
||||
from clan_cli.vars._types import StoreBase
|
||||
|
||||
from .check import check_vars
|
||||
@@ -78,6 +78,8 @@ class Generator:
|
||||
|
||||
|
||||
def bubblewrap_cmd(generator: str, tmpdir: Path) -> list[str]:
|
||||
test_store = nix_test_store()
|
||||
|
||||
# fmt: off
|
||||
return nix_shell(
|
||||
[
|
||||
@@ -87,6 +89,7 @@ def bubblewrap_cmd(generator: str, tmpdir: Path) -> list[str]:
|
||||
[
|
||||
"bwrap",
|
||||
"--ro-bind", "/nix/store", "/nix/store",
|
||||
*(["--ro-bind", str(test_store), str(test_store)] if test_store else []),
|
||||
"--tmpfs", "/usr/lib/systemd",
|
||||
"--dev", "/dev",
|
||||
"--bind", str(tmpdir), str(tmpdir),
|
||||
|
||||
Reference in New Issue
Block a user