mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-24 09:50:58 +01:00
Also add an `allowUnknownSettings` option to enable checking everything except for unknown settings.
33 lines
579 B
Nix
33 lines
579 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"
|
|
'';
|
|
};
|
|
|
|
extraOptions = ''
|
|
some! nonsense {
|
|
which should fail validation
|
|
'';
|
|
checkConfig = false;
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileContent \
|
|
home-files/.config/nix/nix.conf \
|
|
${./skip-check-settings-expected.conf}
|
|
'';
|
|
}
|