2022-03-18 03:47:32 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
nix = {
|
|
|
|
package = config.lib.test.mkStubPackage {
|
2022-03-24 00:11:06 +01:00
|
|
|
version = lib.getVersion pkgs.nixVersions.stable;
|
2022-03-18 03:47:32 +01:00
|
|
|
buildScript = ''
|
|
|
|
target=$out/bin/nix
|
|
|
|
mkdir -p "$(dirname "$target")"
|
|
|
|
|
|
|
|
echo -n "true" > "$target"
|
|
|
|
|
|
|
|
chmod +x "$target"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-06-13 03:47:38 +02:00
|
|
|
nixPath = [ "/a" "/b/c" ];
|
|
|
|
|
2022-03-18 03:47:32 +01:00
|
|
|
settings = {
|
|
|
|
use-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}
|
2024-06-13 03:47:38 +02:00
|
|
|
|
|
|
|
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
|
|
|
'export NIX_PATH="/a:/b/c''${NIX_PATH:+:$NIX_PATH}"'
|
2022-03-18 03:47:32 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|