autojump: autoload when programs.autojump.enable is set.

This commit is contained in:
Bernard Fortz 2018-09-26 14:58:28 +02:00
parent 0bca738513
commit cd8ffef01b

View File

@ -3,15 +3,10 @@
with lib;
let
cfg = config.programs.autojump;
prg = config.programs;
in
{
###### interface
options = {
programs.autojump = {
@ -30,5 +25,9 @@ in
config = mkIf cfg.enable {
environment.pathsToLink = [ "/share/autojump" ];
environment.systemPackages = [ pkgs.autojump ];
programs.bash.interactiveShellInit = "source ${pkgs.autojump}/share/autojump/autojump.bash";
programs.zsh.interactiveShellInit = mkIf prg.zsh.enable "source ${pkgs.autojump}/share/autojump/autojump.zsh";
programs.fish.interactiveShellInit = mkIf prg.fish.enable "source ${pkgs.autojump}/share/autojump/autojump.fish";
};
}