Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4f3475b113c9
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ad37c2c4459d
Choose a head ref
  • 4 commits
  • 1 file changed
  • 2 contributors

Commits on Nov 5, 2020

  1. nixos-help: Do $PATH lookup in nixos-manual.desktop instead of hardco…

    …ding derivation
    
    See db236e5 "steam: Do $PATH lookup in steam.desktop [...]".
    tl;dr: Otherwise widget/panel/desktop icons in DEs like KDE break.
    klemensn authored and andir committed Nov 5, 2020
    Copy the full SHA
    b02719a View commit details
  2. Copy the full SHA
    3560f0d View commit details
  3. nixos-help: bundle the desktop item with the script

    This is to ensure that whenever we install the desktop item we also have
    the script installed. Prior to b02719a we always had the reference to
    the script in the desktop item. Since desktop items are being copied to
    home directories and thus "bit rod" over time that absolute path was
    removed.
    andir committed Nov 5, 2020
    Copy the full SHA
    9a01e97 View commit details

Commits on Nov 16, 2020

  1. Merge pull request #102916 from andir/nixos-help

    nixos-help: fixup .desktop file & smaller refactoring
    andir authored Nov 16, 2020
    Copy the full SHA
    ad37c2c View commit details
Showing with 21 additions and 13 deletions.
  1. +21 −13 nixos/modules/misc/documentation.nix
34 changes: 21 additions & 13 deletions nixos/modules/misc/documentation.nix
Original file line number Diff line number Diff line change
@@ -40,9 +40,9 @@ let
in scrubbedEval.options;
};

helpScript = pkgs.writeScriptBin "nixos-help"
''
#! ${pkgs.runtimeShell} -e

nixos-help = let
helpScript = pkgs.writeShellScriptBin "nixos-help" ''
# Finds first executable browser in a colon-separated list.
# (see how xdg-open defines BROWSER)
browser="$(
@@ -59,14 +59,22 @@ let
exec "$browser" ${manual.manualHTMLIndex}
'';

desktopItem = pkgs.makeDesktopItem {
name = "nixos-manual";
desktopName = "NixOS Manual";
genericName = "View NixOS documentation in a web browser";
icon = "nix-snowflake";
exec = "${helpScript}/bin/nixos-help";
categories = "System";
};
desktopItem = pkgs.makeDesktopItem {
name = "nixos-manual";
desktopName = "NixOS Manual";
genericName = "View NixOS documentation in a web browser";
icon = "nix-snowflake";
exec = "nixos-help";
categories = "System";
};

in pkgs.symlinkJoin {
name = "nixos-help";
paths = [
helpScript
desktopItem
];
};

in

@@ -250,8 +258,8 @@ in

environment.systemPackages = []
++ optional cfg.man.enable manual.manpages
++ optionals cfg.doc.enable ([ manual.manualHTML helpScript ]
++ optionals config.services.xserver.enable [ desktopItem pkgs.nixos-icons ]);
++ optionals cfg.doc.enable ([ manual.manualHTML nixos-help ]
++ optionals config.services.xserver.enable [ pkgs.nixos-icons ]);

services.mingetty.helpLine = mkIf cfg.doc.enable (
"\nRun 'nixos-help' for the NixOS manual."