fork/home-manager
git clone https://git.julia.blue/fork/home-manager
9282dbc1
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . programs . autojump ; 8package = pkgs . autojump ; 9 10in { 11meta . maintainers = [ maintainers . evanjs ]; 12 13options . programs . autojump = { 14enable = mkEnableOption "autojump" ; 15 16enableBashIntegration = mkOption { 17default = true ; 18type = types . bool ; 19description = '' 20Whether to enable Bash integration. 21'' ; 22}; 23 24enableZshIntegration = mkOption { 25default = true ; 26type = types . bool ; 27description = '' 28Whether to enable Zsh integration. 29'' ; 30}; 31 32enableFishIntegration = mkOption { 33default = true ; 34type = types . bool ; 35description = '' 36Whether to enable Fish integration. 37'' ; 38}; 39}; 40 41config = mkIf cfg . enable { 42home . packages = [ package ]; 43 44programs . bash . initExtra = mkIf cfg . enableBashIntegration ( mkBefore '' 45. ${ package } /share/autojump/autojump.bash 46'' ); 47 48programs . zsh . initExtra = mkIf cfg . enableZshIntegration '' 49. ${ package } /share/autojump/autojump.zsh 50'' ; 51 52programs . fish . interactiveShellInit = mkIf cfg . enableFishIntegration '' 53. ${ package } /share/autojump/autojump.fish 54'' ; 55}; 56}