autojump: creates links required by oh-my-zsh for autojump.
The autojump plugin in oh-my-zsh assumes autojump.zsh resides in /run/current-system/sw/share/autojump/ but these links are not created by default. The new programs.autojump.enable option forces the creation of these links.
This commit is contained in:
parent
b97ebadd02
commit
0d749e58f7
@ -78,6 +78,7 @@
|
||||
./misc/version.nix
|
||||
./programs/adb.nix
|
||||
./programs/atop.nix
|
||||
./programs/autojump.nix
|
||||
./programs/bash/bash.nix
|
||||
./programs/bcc.nix
|
||||
./programs/blcr.nix
|
||||
|
33
nixos/modules/programs/autojump.nix
Normal file
33
nixos/modules/programs/autojump.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.autojump;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
programs.autojump = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable autojump.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.pathsToLink = [ "/share/autojump" ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user