-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11739 from DeterminateSystems/test-chroot-store
Add a test for chroot stores
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ lib, config, nixpkgs, ... }: | ||
|
||
let | ||
pkgs = config.nodes.machine.nixpkgs.pkgs; | ||
pkgA = pkgs.hello; | ||
pkgB = pkgs.cowsay; | ||
in { | ||
name = "chroot-store"; | ||
|
||
nodes = | ||
{ machine = | ||
{ config, lib, pkgs, ... }: | ||
{ virtualisation.writableStore = true; | ||
virtualisation.additionalPaths = [ pkgA ]; | ||
environment.systemPackages = [ pkgB ]; | ||
nix.extraOptions = "experimental-features = nix-command"; | ||
}; | ||
}; | ||
|
||
testScript = { nodes }: '' | ||
# fmt: off | ||
start_all() | ||
machine.succeed("nix copy --no-check-sigs --to /tmp/nix ${pkgA}") | ||
machine.succeed("nix shell --store /tmp/nix ${pkgA} --command hello >&2") | ||
# Test that /nix/store is available via an overlayfs mount. | ||
machine.succeed("nix shell --store /tmp/nix ${pkgA} --command cowsay foo >&2") | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters