1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-15 17:51:01 +00:00

add programs.nix-index module

This commit is contained in:
Daiderd Jordan 2017-07-28 23:17:53 +02:00
parent cfc0e3465f
commit 45d259cb3e
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 34 additions and 0 deletions

View file

@ -52,6 +52,7 @@ let
./modules/programs/fish.nix ./modules/programs/fish.nix
./modules/programs/man.nix ./modules/programs/man.nix
./modules/programs/info ./modules/programs/info
./modules/programs/nix-index
./modules/programs/nix-script.nix ./modules/programs/nix-script.nix
./modules/programs/tmux.nix ./modules/programs/tmux.nix
./modules/programs/vim.nix ./modules/programs/vim.nix

View file

@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.nix-index;
in
{
options = {
programs.nix-index.enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable nix-index and it's command-not-found helper.";
};
programs.nix-index.package = mkOption {
type = types.package;
default = pkgs.nix-index;
defaultText = "pkgs.nix-index";
description = "This option specifies the nix-index package to use.";
};
};
config = mkIf config.programs.nix-index.enable {
environment.systemPackages = [ cfg.package ];
environment.interactiveShellInit = "source ${cfg.package}/etc/profile.d/command-not-found.sh";
};
}