diff options
author | Benjamin Staffin <benley@gmail.com> | 2017-03-13 16:53:54 -0400 |
---|---|---|
committer | Benjamin Staffin <benley@gmail.com> | 2017-03-14 06:04:43 -0400 |
commit | 638e1b82439e77e2d195ca768296dfd7ff3f35ff (patch) | |
tree | 5115ca3f4c839ba21e99064984b1704e649fb5a5 /nixos/modules/services/misc/nixos-manual.nix | |
parent | a312abedeb1b935829f2b76e6bbaa494fbcf3f25 (diff) | |
download | nixlib-638e1b82439e77e2d195ca768296dfd7ff3f35ff.tar nixlib-638e1b82439e77e2d195ca768296dfd7ff3f35ff.tar.gz nixlib-638e1b82439e77e2d195ca768296dfd7ff3f35ff.tar.bz2 nixlib-638e1b82439e77e2d195ca768296dfd7ff3f35ff.tar.lz nixlib-638e1b82439e77e2d195ca768296dfd7ff3f35ff.tar.xz nixlib-638e1b82439e77e2d195ca768296dfd7ff3f35ff.tar.zst nixlib-638e1b82439e77e2d195ca768296dfd7ff3f35ff.zip |
nixos: Add a menu launcher for the NixOS manual
Diffstat (limited to 'nixos/modules/services/misc/nixos-manual.nix')
-rw-r--r-- | nixos/modules/services/misc/nixos-manual.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix index 306ee346523d..622607f3b32d 100644 --- a/nixos/modules/services/misc/nixos-manual.nix +++ b/nixos/modules/services/misc/nixos-manual.nix @@ -41,7 +41,7 @@ let entry = "${manual.manual}/share/doc/nixos/index.html"; - help = pkgs.writeScriptBin "nixos-help" + helpScript = pkgs.writeScriptBin "nixos-help" '' #! ${pkgs.stdenv.shell} -e browser="$BROWSER" @@ -58,6 +58,15 @@ let exec "$browser" ${entry} ''; + desktopItem = pkgs.makeDesktopItem { + name = "nixos-manual"; + desktopName = "NixOS Manual"; + genericName = "View NixOS documentation in a web browser"; + # TODO: find a better icon (Nix logo + help overlay?) + icon = "system-help"; + exec = "${helpScript}/bin/nixos-help"; + categories = "System"; + }; in { @@ -105,7 +114,8 @@ in system.build.manual = manual; environment.systemPackages = - [ manual.manual help ] + [ manual.manual helpScript ] + ++ optional config.services.xserver.enable desktopItem ++ optional config.programs.man.enable manual.manpages; boot.extraTTYs = mkIf cfg.showManual ["tty${toString cfg.ttyNumber}"]; |