diff --git a/lib/types.nix b/lib/types.nix index 11280330..38a06727 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -151,10 +151,10 @@ rec { }; }; - config.content = lib.mkMerge [ - (lib.mkIf (config.pre != null) (mkBeforeSection config.pre)) - (lib.mkIf (config.post != null) (mkAfterSection config.post)) - ]; + config.content = lib.mkMerge ( + lib.optional (config.pre != null) (mkBeforeSection config.pre) + ++ lib.optional (config.post != null) (mkAfterSection config.post) + ); } ); }