modules/output: assert pure rtp needs wrapper

This commit is contained in:
Austin Horstman 2026-05-23 23:01:07 -05:00
parent d82f383100
commit 06a19e0783
2 changed files with 19 additions and 0 deletions

View file

@ -420,6 +420,13 @@ in
wrapRc = lib.mkOverride 1501 true;
impureRtp = lib.mkOverride 1501 false;
assertions = lib.nixvim.mkAssertions "output" [
{
assertion = config.impureRtp || config.wrapRc;
message = "`impureRtp = false` requires `wrapRc = true` so Nixvim can suppress system/XDG startup config.";
}
];
extraConfigLuaPre = lib.mkOrder 100 (
lib.concatStringsSep "\n" (
lib.optional (!config.impureRtp) ''

View file

@ -271,6 +271,18 @@
];
};
impureRtp-disabled-requires-wrapRc = {
wrapRc = false;
impureRtp = false;
test.assertions = expect: [
(expect "count" 1)
(expect "anyExact" "Nixvim (output): `impureRtp = false` requires `wrapRc = true` so Nixvim can suppress system/XDG startup config.")
];
test.buildNixvim = false;
};
extraPackagesAfter =
{ pkgs, ... }:
{