diff options
author | Benjamin Staffin <benley@gmail.com> | 2017-03-15 04:37:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-15 04:37:16 -0400 |
commit | 98e4c5dd4572d7d38a7fef223f726f89306b20a7 (patch) | |
tree | ecfae2cdeae64010e0fb227591eda331c3636243 /nixos | |
parent | 19cb65206f22dc90388667822f91b3a5892c97c2 (diff) | |
parent | 638e1b82439e77e2d195ca768296dfd7ff3f35ff (diff) | |
download | nixlib-98e4c5dd4572d7d38a7fef223f726f89306b20a7.tar nixlib-98e4c5dd4572d7d38a7fef223f726f89306b20a7.tar.gz nixlib-98e4c5dd4572d7d38a7fef223f726f89306b20a7.tar.bz2 nixlib-98e4c5dd4572d7d38a7fef223f726f89306b20a7.tar.lz nixlib-98e4c5dd4572d7d38a7fef223f726f89306b20a7.tar.xz nixlib-98e4c5dd4572d7d38a7fef223f726f89306b20a7.tar.zst nixlib-98e4c5dd4572d7d38a7fef223f726f89306b20a7.zip |
Merge pull request #23861 from benley/nixos-manual-launcher
nixos: Add a menu launcher for the NixOS manual
Diffstat (limited to 'nixos')
-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}"]; |