lib.modules: Make option injection work when shorthandOnlyDefinesConfig

This commit is contained in:
Robert Hensing 2022-02-28 22:57:03 +01:00
parent 11537c9c02
commit 8baea8b82c
6 changed files with 17 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ lib, ... }:
{ config, lib, ... }:
let
inherit (lib) mkOption types;
in
@ -6,7 +6,13 @@ in
options.bare-submodule = mkOption {
type = types.submoduleWith {
modules = [ ];
shorthandOnlyDefinesConfig = config.shorthandOnlyDefinesConfig;
};
default = {};
};
# config-dependent options: won't recommend, but useful for making this test parameterized
options.shorthandOnlyDefinesConfig = mkOption {
default = false;
};
}