mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
The Nix configuration file sandbox setting is now "sandbox", not "use-sandbox". Correct the documentation and tests that reference this setting.
46 lines
805 B
Nix
46 lines
805 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
nix = {
|
|
package = config.lib.test.mkStubPackage {
|
|
version = lib.getVersion pkgs.nixVersions.stable;
|
|
buildScript = ''
|
|
target=$out/bin/nix
|
|
mkdir -p "$(dirname "$target")"
|
|
|
|
echo -n "true" > "$target"
|
|
|
|
chmod +x "$target"
|
|
'';
|
|
};
|
|
|
|
nixPath = [
|
|
"/a"
|
|
"/b/c"
|
|
];
|
|
|
|
settings = {
|
|
sandbox = true;
|
|
show-trace = true;
|
|
system-features = [
|
|
"big-parallel"
|
|
"kvm"
|
|
"recursive-nix"
|
|
];
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileContent \
|
|
home-files/.config/nix/nix.conf \
|
|
${./example-settings-expected.conf}
|
|
|
|
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
|
'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"'
|
|
'';
|
|
}
|