Skip to content
Commit 6e4096d7 authored by ivanbrennan's avatar ivanbrennan
Browse files

nixos/less: add configFile option

Expose the path to a lesskey file as a module option. This makes it
possible to maintain a single lesskey file, used for both NixOS and
non-nix systems. An example of how this can be done follows.

1. Write a derivation that fetches lesskey from a known location:

  { stdenv, fetchgit }:
  stdenv.mkDerivation {
    name = "foo";
    src = fetchgit { .. };
    phases = [ "unpackPhase" "installPhase" ];
    installPhase = "mkdir -p $out && cp $src/lesskey $out/lesskey";
  }

2. Set programs.less.configFile to the corresponding path:

    programs.less = {
      enable = true;
      configFile = "${pkgs.foo}/lesskey";
    };
parent 2b6bae56
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment