@@ -40,9 +40,9 @@ let
4040 in scrubbedEval.options;
4141 };
4242
43− helpScript = pkgs.writeScriptBin "nixos-help"
44− ''
45− #! ${pkgs.runtimeShell} -e
43+
44+ nixos-help = let
45+ helpScript = pkgs.writeShellScriptBin "nixos-help" ''
4646 # Finds first executable browser in a colon-separated list.
4747 # (see how xdg-open defines BROWSER)
4848 browser="$(
@@ -59,14 +59,22 @@ let
5959 exec "$browser" ${manual.manualHTMLIndex}
6060 '';
6161
62− desktopItem = pkgs.makeDesktopItem {
63− name = "nixos-manual";
64− desktopName = "NixOS Manual";
65− genericName = "View NixOS documentation in a web browser";
66− icon = "nix-snowflake";
67− exec = "${helpScript}/bin/nixos-help";
68− categories = "System";
69− };
62+ desktopItem = pkgs.makeDesktopItem {
63+ name = "nixos-manual";
64+ desktopName = "NixOS Manual";
65+ genericName = "View NixOS documentation in a web browser";
66+ icon = "nix-snowflake";
67+ exec = "nixos-help";
68+ categories = "System";
69+ };
70+
71+ in pkgs.symlinkJoin {
72+ name = "nixos-help";
73+ paths = [
74+ helpScript
75+ desktopItem
76+ ];
77+ };
7078
7179in
7280
@@ -250,8 +258,8 @@ in
250258
251259 environment.systemPackages = []
252260 ++ optional cfg.man.enable manual.manpages
253− ++ optionals cfg.doc.enable ([ manual.manualHTML helpScript ]
254− ++ optionals config.services.xserver.enable [ desktopItem pkgs.nixos-icons ]);
261+ ++ optionals cfg.doc.enable ([ manual.manualHTML nixos-help ]
262+ ++ optionals config.services.xserver.enable [ pkgs.nixos-icons ]);
255263
256264 services.mingetty.helpLine = mkIf cfg.doc.enable (
257265 "\nRun 'nixos-help' for the NixOS manual."