diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-02-28 22:57:03 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-03-03 00:29:14 +0100 |
commit | 8baea8b82cc80c6a2843045d5b554f7f65acbc4f (patch) | |
tree | 36e98bae1a6abadbb49096aaa5ae4235996ecf65 /lib/types.nix | |
parent | 11537c9c0239dc4ae52477faa78a4a0a7bdf206c (diff) |
lib.modules: Make option injection work when shorthandOnlyDefinesConfig
Diffstat (limited to 'lib/types.nix')
-rw-r--r-- | lib/types.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix index 3fcac9c31b313..bd4062d555aa3 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -637,7 +637,11 @@ rec { then lhs.specialArgs // rhs.specialArgs else throw "A submoduleWith option is declared multiple times with the same specialArgs \"${toString (attrNames intersecting)}\""; shorthandOnlyDefinesConfig = - if lhs.shorthandOnlyDefinesConfig == rhs.shorthandOnlyDefinesConfig + if lhs.shorthandOnlyDefinesConfig == null + then rhs.shorthandOnlyDefinesConfig + else if rhs.shorthandOnlyDefinesConfig == null + then lhs.shorthandOnlyDefinesConfig + else if lhs.shorthandOnlyDefinesConfig == rhs.shorthandOnlyDefinesConfig then lhs.shorthandOnlyDefinesConfig else throw "A submoduleWith option is declared multiple times with conflicting shorthandOnlyDefinesConfig values"; }; |