From c0c43e9c0767bb49a836d165f2b542a3e1334362 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Sat, 28 Apr 2018 20:05:00 +0000 Subject: [PATCH] lib: simplify `mkAliasAndWrapDefinitions` --- lib/modules.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/modules.nix b/lib/modules.nix index 8baae4917053..19e553bbc9b9 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -532,9 +532,7 @@ rec { # mkAliasDefinitions = mkAliasAndWrapDefinitions id; mkAliasAndWrapDefinitions = wrap: option: - mkMerge - (optional (isOption option && option.isDefined) - (wrap (mkMerge option.definitions))); + mkIf (isOption option && option.isDefined) (wrap (mkMerge option.definitions)); /* Compatibility. */