@@ -40,8 +40,9 @@ let
4040 in scrubbedEval.options;
4141 };
4242
43− helpScript = pkgs.writeShellScriptBin "nixos-help"
44− ''
43+
44+ nixos-help = let
45+ helpScript = pkgs.writeShellScriptBin "nixos-help" ''
4546 # Finds first executable browser in a colon-separated list.
4647 # (see how xdg-open defines BROWSER)
4748 browser="$(
@@ -58,14 +59,22 @@ let
5859 exec "$browser" ${manual.manualHTMLIndex}
5960 '';
6061
61− desktopItem = pkgs.makeDesktopItem {
62− name = "nixos-manual";
63− desktopName = "NixOS Manual";
64− genericName = "View NixOS documentation in a web browser";
65− icon = "nix-snowflake";
66− exec = "nixos-help";
67− categories = "System";
68− };
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+ };
6978
7079in
7180
@@ -249,8 +258,8 @@ in
249258
250259 environment.systemPackages = []
251260 ++ optional cfg.man.enable manual.manpages
252− ++ optionals cfg.doc.enable ([ manual.manualHTML helpScript ]
253− ++ 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 ]);
254263
255264 services.mingetty.helpLine = mkIf cfg.doc.enable (
256265 "\nRun 'nixos-help' for the NixOS manual."