From b870fb2d62ee0deb657951f83e8689143dce98c8 Mon Sep 17 00:00:00 2001
From: Qiming Chu <cchuqiming@gmail.com>
Date: Tue, 18 Mar 2025 04:24:59 +0800
Subject: [PATCH] zsh: update zsh initContent example to use
 lib.literalExpression (#6637)

Update the `initContent` option example in `zsh.nix` to use
`lib.literalExpression` for correctly display in documentation.

Signed-off-by: Qiming Chu <cchuqiming@gmail.com>
---
 modules/programs/zsh.nix | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix
index 9d2631ace..c834a374a 100644
--- a/modules/programs/zsh.nix
+++ b/modules/programs/zsh.nix
@@ -455,8 +455,10 @@ in
       initContent = mkOption {
         default = "";
         type = types.lines;
-        example = lib.mkOrder 1000 ''
-          echo "Hello, initContent!"
+        example = lib.literalExpression ''
+          lib.mkOrder 1000 ''''
+            echo "Hello zsh initContent!"
+          '''';
         '';
         description = "Content to be added to {file}`.zshrc`. To specify the order, use `lib.mkOrder`.";
       };