aboutsummaryrefslogtreecommitdiff
path: root/tests/nixos
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2024-01-11 07:21:16 -0500
committerShea Levy <shea@shealevy.com>2024-01-11 07:21:16 -0500
commitba48ab4b954dd1c8af388d1c5a33bbd62373c6f5 (patch)
treef17f8492bed32f78c04d9d4e9ffd2b672af85943 /tests/nixos
parente7c2b35827e9f4ddbec4248c5cf1ad793a2988ad (diff)
parent4dd5171652018e29bf9e496522df3be51d615a2c (diff)
Merge branch '2.18-maintenance' into ifd-buildStore-2.18
Diffstat (limited to 'tests/nixos')
-rw-r--r--tests/nixos/containers/containers.nix4
-rw-r--r--tests/nixos/containers/systemd-nspawn.nix2
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/nixos/containers/containers.nix b/tests/nixos/containers/containers.nix
index e721be48f..c8ee78a4a 100644
--- a/tests/nixos/containers/containers.nix
+++ b/tests/nixos/containers/containers.nix
@@ -56,8 +56,8 @@
host.fail("nix build -v --auto-allocate-uids --no-sandbox -L --offline --impure --file ${./id-test.nix} --argstr name id-test-6 --arg uidRange true")
# Run systemd-nspawn in a Nix build.
- #host.succeed("nix build -v --auto-allocate-uids --sandbox -L --offline --impure --file ${./systemd-nspawn.nix} --argstr nixpkgs ${nixpkgs}")
- #host.succeed("[[ $(cat ./result/msg) = 'Hello World' ]]")
+ host.succeed("nix build -v --auto-allocate-uids --sandbox -L --offline --impure --file ${./systemd-nspawn.nix} --argstr nixpkgs ${nixpkgs}")
+ host.succeed("[[ $(cat ./result/msg) = 'Hello World' ]]")
'';
}
diff --git a/tests/nixos/containers/systemd-nspawn.nix b/tests/nixos/containers/systemd-nspawn.nix
index f54f32f2a..1dad4ebd7 100644
--- a/tests/nixos/containers/systemd-nspawn.nix
+++ b/tests/nixos/containers/systemd-nspawn.nix
@@ -73,6 +73,8 @@ runCommand "test"
--resolv-conf=off \
--bind-ro=/nix/store \
--bind=$out \
+ --bind=/proc:/run/host/proc \
+ --bind=/sys:/run/host/sys \
--private-network \
$toplevel/init
''