about summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorBernard Fortz <bernard.fortz@gmail.com>2018-09-26 14:58:28 +0200
committerBernard Fortz <bernard.fortz@gmail.com>2018-09-26 14:59:49 +0200
commitcd8ffef01b4629980bb77e33a20c24c236ac41be (patch)
tree47def7217f57f381986f27fc6c59282a2b32ad73 /nixos/modules/programs
parent0bca7385139771082f8c89f3f1d4a067bbda3f59 (diff)
downloadnixlib-cd8ffef01b4629980bb77e33a20c24c236ac41be.tar
nixlib-cd8ffef01b4629980bb77e33a20c24c236ac41be.tar.gz
nixlib-cd8ffef01b4629980bb77e33a20c24c236ac41be.tar.bz2
nixlib-cd8ffef01b4629980bb77e33a20c24c236ac41be.tar.lz
nixlib-cd8ffef01b4629980bb77e33a20c24c236ac41be.tar.xz
nixlib-cd8ffef01b4629980bb77e33a20c24c236ac41be.tar.zst
nixlib-cd8ffef01b4629980bb77e33a20c24c236ac41be.zip
autojump: autoload when programs.autojump.enable is set.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/autojump.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/nixos/modules/programs/autojump.nix b/nixos/modules/programs/autojump.nix
index 9fc8382a7541..3a8feec4bb45 100644
--- a/nixos/modules/programs/autojump.nix
+++ b/nixos/modules/programs/autojump.nix
@@ -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";
   };
 }