autojump: autoload when programs.autojump.enable is set.
This commit is contained in:
parent
0bca738513
commit
cd8ffef01b
1 changed files with 5 additions and 6 deletions
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue