Files
aszlig 7c7e795df1 nixos/test-driver: Use types.lines for testScript
I usually write extensive test modules and more often than not, I want
to use something like this:

  testScript = lib.mkBefore ''
    ... some common initialisation ...
  '';

Unfortunately, the type of testScript is types.str, so right now I'm
working around this using ugly things like this:

  options.testScript = lib.mkOption {
    type = let
      newType = types.either types.lines (types.functionTo types.lines);
    in newType // {
      typeMerge = lib.const newType;
    };
  };

While this results in roughly the same (using types.lines instead of
types.str), I should not have to do this downstream, so hereby let's
make it types.lines.

Signed-off-by: aszlig <aszlig@nix.build>
2026-08-13 01:03:13 +02:00
..