nixpkgs/nixos/tests/nix-required-mounts/ensure-path-not-present.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
272 B
Nix
Raw Normal View History

2023-10-17 13:25:17 +01:00
{
2024-06-20 22:33:51 +01:00
pkgs ? import <nixpkgs> { },
feature,
}:
pkgs.runCommandNoCC "${feature}-not-present" { } ''
2023-10-17 13:25:17 +01:00
if [[ -e /${feature}-files ]]; then
echo "No ${feature} in requiredSystemFeatures, but /${feature}-files was mounted anyway"
exit 1
else
touch $out
fi
''